-
Notifications
You must be signed in to change notification settings - Fork 10
Ubuntu Command Cheatsheet
Jignesh Greycube edited this page Nov 16, 2021
·
6 revisions
remove contents of folder
rm -r /path/to/directory/*
change ownership of all files and folders of a directory
go inside the directory
chown -R username:groupname .
To know folder size
du -ch folder-name/ | grep total
Output
15G total
To know the size of the files/ folder
du -h --max-depth=1 /path/to/directory
file size on disk
df -h
top 10 files by size
du -hsx * | sort -rh | head -10
to unmount the disk
sudo umount /dev/sdb OR sudo umount /path/to/directory
find file
find . -name "*filenamekeyword*"