Difference between revisions of "Centos Bash Commands"

From rbachwiki
Jump to navigation Jump to search
(Created page with "'''Check Bash Shells installed''' cat /etc/shells ''' Check who is logged on ''' id whoami w who ''' Check type of System''' uname -a")
 
Line 8: Line 8:
''' Check type of System'''
''' Check type of System'''
  uname -a
  uname -a
'''File Commands'''
locate filename
The locate command looks in a premade database that contains a list of all the files on the system. This database is indexed much like a textbook for fast searching, yet can become outdated as files are added and removed from the system, which happens on a regular basis. As a result, the database used for the locate command (/var/lib/mlocate/mlocate.db) is updated each day automatically and can be updated manually by running the updatedb command at a command prompt. You can configure the directories that are searched by the updatedb command by editing the /etc/updatedb.conf file.

Revision as of 21:26, 29 January 2019

Check Bash Shells installed

cat /etc/shells

Check who is logged on

id
whoami
w
who

Check type of System

uname -a

File Commands

locate filename

The locate command looks in a premade database that contains a list of all the files on the system. This database is indexed much like a textbook for fast searching, yet can become outdated as files are added and removed from the system, which happens on a regular basis. As a result, the database used for the locate command (/var/lib/mlocate/mlocate.db) is updated each day automatically and can be updated manually by running the updatedb command at a command prompt. You can configure the directories that are searched by the updatedb command by editing the /etc/updatedb.conf file.