The grep command on Linux
grep on Linux, a remarkably useful command that will save you loads of time.…
ReadLinux: find the size of the folders and files in a directory
Using Linux and want to know the total size of a folder or file?
For this, we use the "du" command, which stands for "Disk Usage".
du -h
The "h" option stands for "human readable", which displays the result in KB, MB, GB...
du -sh /monrepertoire
The -s option shows only the total size of the directory
du -sh /monrepertoire/* | sort -hr
Sort is used to sort the results:
- h means "human" output, in other words human-readable sizes
- r reverses the order so the largest directories are shown first.
du -h --max-depth=1 | sort -hr
--max-depth=1 shows only first-level directories
Website design, e-commerce or SEO: our web agency in Paris, Besançon and Normandy can help.
Free quotegrep on Linux, a remarkably useful command that will save you loads of time.…
ReadHow to list the files and folders in a directory by date…
Read