Add Linux directory info commands
This commit is contained in:
parent
21cb6ca5e4
commit
ac9a0b9716
|
@ -80,6 +80,15 @@ sudo lsblk -f -m
|
|||
|
||||
# View the total size of a directory.
|
||||
sudo du -sh /path/to/directory
|
||||
# Show by child directory size.
|
||||
sudo du -h /path/to/directory --max-depth=1
|
||||
# Show largest directories first.
|
||||
sudo du -h /path/to/directory --max-depth=1 | sort -hr
|
||||
# Sort by directory name.
|
||||
sudo du -h /path/to/directory --max-depth=1 | sort -k2
|
||||
# Largest directories.
|
||||
sudo du --separate-dirs -h /path/to/directory | sort -hr | head
|
||||
sudo du --separate-dirs -h /path/to/directory | sort -hr | head -n 2
|
||||
|
||||
# Get all .mp4 files sorted by date and showing date, folder name, file name, and size.
|
||||
# Excludes ._ and .DS_Store files (macOS).
|
||||
|
|
Loading…
Reference in New Issue