Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
find command
Name: phgct2004 Date: March 29, 2004 at 21:45:49 Pacific OS: linux 9.0 CPU/Ram: 866/128
Comment:
hi,
how can i find the largest file in my current directory?
Name: nails Date: March 29, 2004 at 22:13:44 Pacific
Reply:
Hi:
There's lots of ways of doing this. This find command delivers the five largest files in the current directory:
find . -follow -mount -type f -print | xargs ls -l |\ sort -r -n -k 5,5 | head -5
Regards,
Nails
0
Response Number 2
Name: phgct2004 Date: March 29, 2004 at 22:52:10 Pacific
Reply:
hi Nails,
when i using the command that u give me, the error message showing out the "xargs: unmatched single quote"
what is this mean ? how to solve this proble?
thank
chui
phgct
0
Response Number 3
Name: Dlonra Date: March 30, 2004 at 08:33:59 Pacific
Reply:
this find large files and directories ls -l|sort +4 -n|tail -5 on linux ls -lS|head -6 or du -s *|sort -n|tail -5
0
Response Number 4
Name: nails Date: March 30, 2004 at 09:09:25 Pacific
Reply:
Hi:
The "unmatched single quote" error doesn't make much sense since there's no single quotes in the find command I've posted. Two issues:
1) Are you aware that the "\" character at the end of the first line is a continuation character? This command works with "\" only if there's a carriage return immediately after it.
2) Do you have weird characters in the file names - especially spaces. If you have file names with spaces, you might try this command:
find . -type f -print | while read myfile; do echo "${myfile}"| awk '$NF >= 2' ; done
Summary: Hy, Does someone know how to setup "find" command allowing to find all files or directories according to a specific filter whatever case sensitive (I'm working on AIX platform 4.3.3). Example: fi...
Summary: Hi, Anyone knows how to use the 'find' command using a specified depth level within the directoy hierarchy? for instance: find * -type f -name this will search including all subdirectories, is there ...