# --> root user prompt. $ --> user working prompt. $ log name --> displays current user name. $ pwd --> present working directory. $ date --> Display current date & time. $cal --> Displays current month calendar. $cal 2020 --> particular year total months. $cal 04 2020 --> 2020 year 04th month calendar. $who --> To display the information about all the users who have logged into the system. $ who am i --> It displays current user name. $ finger --> It displays complete information about all the users who are logged in. $ uptime --> How log server up & running, how many users connected and load avg time. $ which (Or) $ wher --> Given command location EX: Which date $tty --> Terminal position. $df --> Displays disk free size $du --> Disk usage information $clear --> To clear the screen Creating files:
$Cat>filename Hello world Ctrl+D (To save the file)
$cat<filename (or) $cat filename
$cat >>filename ------------------------- ------------------------- Ctrl +D (To save)
Syn: $touch file1 file2 file3 ……………..filen Ex: $touch file1 file2 file3
Options: - r -->Reverse - i -->inode -a --> hidden - l --> long list -R -->Recursively - h --> human readable Mkdr: Creates a directory. Syn: mkdir <Dirname> $mkdir linux
$ mkdir dir1 dir2 dir3 -----------------dirn
$ mkdir –P world/asia/india/ap/hyd Parent
(or) $ ls – R
Cd: Changes the current location. Cd.. --->To go one level back cd../.. ---> To go two levels back cd --->To change user’s home directory. EX: $ cd world $ ls Note: The trailing slash (1) is optional when you’re using the cd command. It indicates that the name being specified is a directory. EX: $cd Documents/
Syn: CP [options] source destination --- R ---> copies recursively --- f ---> Copies forcefully --- V ---> provides verbose output EX: $ CP file1 file2 ------------> one file to another. $CP file1 file2 Documents ------------> Multiple files into directory. $CP -R Documents unix ------------>one directory to another. $ CP –rvf Documents unix world/asia/india/ap/hyd $ CP /var/log/messags ------------> (.) represents current location.
Learn more about Linux Interview Questions in this blog post. Interested in mastering Linux ? Check out this blog post to learn more Linux Training
Syn: mv [options} SOURCE DEST --- V --> verbose
Mv messages messages.bak
Mv messages. Bak test/ $ls test
Syn: rm [options} FILE --- i ---> interactive --- r ---> Recursively --- f ---> Forcefully
$cd test $rm - I messages. Bak
$ cd .. $ rm - rf test/
Syn: file <file name> Ex: $ file test1 Test1: empty $ file /etc/passwd Password : ASCII test. For indepth understanding of Linux click on
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.