Site icon Web Niraj

Useful Linux Commands

Managing a server using SSH and Command Line Access over the past few years has taught me a lot. It’s sometimes important to check how a server is doing in terms of load or you may simply want to check hard disk usage. Here are some commands I’ve frequently used:

Listing the number of files in a directory:

ls | wc -l

Display the size of a directory in readable format (recursively):

du -h

Display the total size of a directory (can take some time for large directories):

du -h | tail -n 1

Checking hard disk usage:

df -h -T

Check server load, memory usage and running processes:

top

Checking server load and uptime:

uptime

Exit mobile version