It’s annoying when you need to do certain things on Linux environments and you forgot the command to tell the computer what to do.
This happens to me all the time and so does everyone on the planet, not limited to tech people, I believe.
Without further ado, here are the Linux commands I find useful and worth to note down:
Check storage size: df -h
Check a directory size: du -h /path/to/directory
Delete file content: truncate -s 0 [file-name]
List down files whose size are more than 100MB: find / -size +100M -ls
List down files between 100MB and 1GB: find / -size +100M -size -1024M -ls
List all system users: less /etc/passwd
Change ownership of the specific user recursively down the folders: chown -R [user]:[group] *
Zip the entire directory zip -r filename.zip *
Extract the zip file to the current directory unzip filename.zip