-
Check your current working directory/location :
$ pwd -
To display the name of current logged in user :
$ whoami
-
To check System date and time :
$ date
we can customize the result of the date command ,Some examples are following :
$ date +%D # used only for getting the date
$ date +%T # used only for getting the current time
$ date +%H:%M # used only for getting the current time in HH:MM format
$ date +%h # used only for getting the first 3 letters of month name-
To display/list files and directories present in current location :
$ ls
Options for ls command :
$ ls -lt #This displays latest modified file on the top and it is long listing format. $ ls -ltr #This is opposite for command for lt option and output result will be in reverse order. $ ls -lh #This displays the output in human readble and long listing format.
output format for **ls **command will be in following manner :
<File-permission> <No. of hard links> <owner-name> <Group> <Modification-date-and-time> <File-size> <File-Name>-
space for short listing format :
-
To clear current Terminal screen:
$ clear
- To display content of the file on terminal
$ cat <file-name>Note: If the file does not have an extension, do not mention it. If the file has an extension, mention the file name along with the extension.
Note: File name can have an extension or may not have an extension.





