List files without path
I'm trying to run a SUM on some files and I'm trying to figure out how to list them in a certain way.
If I have three 4 files: /tmp/test1 /home/test2 /user/local/bin/test3 /root/test4 And I want to do a sum on them: find / -name test* | xargs sum | awk ' {print $1, $2, $3} ' 48946 1 /tmp/test1 19974 2 /home/test2 59667 3 /user/local/bin/test3 40093 2 /root/test4 How do I get it to list only the file name and not where it resides? 48946 1 test1 19974 2 test2 59667 3 test3 40093 2 test4 Thanks again! |
'man basename'
i think it's: Code:
basename /path/to/file |
Thanks Schneidz... :) I'm playing with it right now... Seems like what I'm looking for if I could only get it to work now!
|
All times are GMT -5. The time now is 04:06 AM. |