Linux common commands

1. Check folder size

$ du -hs /path/to/directory

2. Zip a folder

$ zip -r filename.zip /path/to/folder

3. Mount a portable harddrive / usb drive

$/sbin/fdisk -l

4. Check memory usage

$ free -m

by look into the free column of -/+ buffers/cache line, it’s the free memory that can be used by applications.

5. Check if a package is installed (RedHat Enterprise/Fedora/Suse/CentOS)

$rpm -qa | grep PACKAGE-NAME

RSS feed for comments on this post · TrackBack URL

Leave a Comment