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!
Last edited by mijohnst; 12-05-2005 at 02:23 PM.
|