Change to root when login as any user with root privileged
sudo -i
cat /etc/passwd
df -h
- will show each first level directory
or
df / -h
- will show total
whereis <command>
or
which <command>
file --mime-type -b <filename>
sudo chown -R username:group directory
When your /var/log
folder become to big, is good to cleanup once a while,
Delete all log
find /var/log -type f -delete
Delete all .gz and rotated file
find /var/log -type f -regex ".*\.gz$"
find /var/log -type f -regex ".*\.[0-9]$"
- How to find out how much disk space is remaining?
- How do I determine the total size of a directory (folder) from the command line?
- How do I remove multiple files with a common prefix and suffix?
- Delete all of Var Log
- Find Top Large Directories and Files Sizes in Linux
- How to truncate all logfiles?
- Linux List All Users In The System