LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   best way to find out what is taking up the bulk of your hard drive space? (https://www.linuxquestions.org/questions/linux-software-2/best-way-to-find-out-what-is-taking-up-the-bulk-of-your-hard-drive-space-338687/)

dr_zayus69 06-30-2005 07:09 AM

best way to find out what is taking up the bulk of your hard drive space?
 
hi im trying to backup some stuff from hard drive one to hard drive two for a fresh install on harddrive one. however harddrive two is almost filled and i don't think it will hold all the stuff to back up. What is the best way to find out what is taking up all the space? I think i remember reading in my shell scripting book about something that could search and would display files above a certain size that you set. I think it might have been something to do with awk or sed i'd have to check it again. i appreciate any reply, thanks in advance.

gomerb 06-30-2005 07:42 AM

Find it with find�
 
The find command will do this for you - and a lot of other stuff.
man find -will show that find has a heap of options including file size.

cd to the directory at the top of the tree you want to search from and run

find . -size +1000k -ls

will show everything over a megabyte in size.

Once you are happy with the results you can even get find to remove the files for you (dangerous!).

find /junk -size +10000k -exec rm {} \; :tisk: :cry:

amosf 06-30-2005 07:51 AM

fsview will also give a nice graphical representation of what and where the data is, which can help visualize it for you...


All times are GMT -5. The time now is 04:24 AM.