Here's a convenient way of finding those space hogs in your home directory (can be any directory). For me, those large files are usually a result of mkfile event (testing purposes) and can be promptly deleted. Here's an example of its use.
# cd /export/home/esofthub
# ls -l | sort +4n | awk '{print $5 "\t" $9}'
Find recursively (a little awkward)
# ls -lR | sort +4n | awk '{print $5 "\t" $9}' | more
This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device drivers, peripherals and third party applications. Share tips/comments. Read the comments. But most importantly: Read Disclaimer - Read Disclaimer.
3 comments:
Nice, but why not use "du -sk *|sort -n" insted of big "ls -l | sort +4n | awk '{print $5 "\t" $9}'" ? :)
appreciate the tip
You could also use in a built-in of ls:
ls -lhS
the -S option sorts by size.
-ucf
Post a Comment