UP TO 80% DISCOUNT ON AMAZON LIMITED TIME ...

Sunday, 2 August 2015

Linux Terminal Commands-1

Linux Terminal Commands-1


System Info commands:

DescriptionShortcut key
Show the current date and timedate
Show this month's calendarcal
Show current uptimeuptime
Display who is onlinew
Who you are logged in aswhoami
Display information about userfinger user
Show kernel informationuname -a
CPU informationcat /proc/cpuinfo
Memory informationcat /proc/meminfo
Show disk usagedf -h
Show directory space usagedu
Show memory and swap usagefree

Searching commands:


DescriptionShortcut key
Search for pattern in filesgrep pattern files
Search recursively for pattern in dirgrep -r pattern dir
Search for pattern in the output of commandcommand | grep pattern
Find all instances of filelocate file
Starting with the root directory, look for the file called filenamefind / -name filename
Starting with the root directory, look for the file containing the string filenamefind / -name "*filename*"
Find a file called filename using the locate command; this assumes you have already used the command updatedblocate filename
Create or update the database of files on all file systems attached to the Linux root directoryupdatedb
Show the subdirectory containing the executable filewhich filename
Starting with the directory called dir, look for and list all files containing TextStringToFindgrep TextStringToFind /dir

No comments:

Post a Comment