How to List All Files Ordered by Size in Linux
This article has a very usefull use of ls syntax to list files ordered by size:
if you want deepen, you can search into directories, see this article.
Or you can use another this commands:
for i in `ls`; do if [ -d $i ]; then du -sh $i; fi; done
du --max-depth=1 -xh /var |sort -h
find / \( -name "*.log" -o -name "*.out" -o -name "*.txt" \) -exec /bin/du -s {} \; |sort -n -f
find /disk3 -type f -size +1000000k -exec ls -lh {} \;
du -sh `find . -maxdepth 1 -type d`
if you want deepen, you can search into directories, see this article.
Or you can use another this commands:
for i in `ls`; do if [ -d $i ]; then du -sh $i; fi; done
du --max-depth=1 -xh /var |sort -h
find / \( -name "*.log" -o -name "*.out" -o -name "*.txt" \) -exec /bin/du -s {} \; |sort -n -f
find /disk3 -type f -size +1000000k -exec ls -lh {} \;
du -sh `find . -maxdepth 1 -type d`
Comentarios
Publicar un comentario