UNIX: Find the largest files and directories

Today I was connected to my server through SSH copying over a site to a new domain and needed to figure out if I had enough server space for the copy and which files/folders were taking up the most space. I’d never done this before so I did a quick search in google and pulled up this site.

I found this article

# du -a /var | sort -n -r | head -n 10


So I changed “/var” to my httpdocs folder and changed 10 to 100 and boom, I got list of all these files I had totally forgotten about. What a sweet command. It let me get back a ton of server space from files and folders I no longer needed.

Thanks cyberciti for the article.
Теги:
UNIX, large files, server space
Добавлено: 08 Апреля 2015 08:53:53 Добавил: Андрей Ковальчук Нравится 0
Добавить
Комментарии:
Нету комментариев для вывода...