Basic Commands 8thjuly2022
Basic Commands 8thjuly2022
BASIC COMMANDS
ls
This is used to list the directory content. We have different options in
this. Let us discuss some important options.
-a It lists all files and directories including hidden. Some
files/directories starts with dot (.) they are called hidden files/directories.
- it is an ordinary file
d it is a directory
c it is a character file
l it is a link file
s it is a socket file
mkdir
We use this command to create a directory.
#mkdir dir1
#mkdir –p 1/2/3/4/5
pwd
It gives you the present working directory.
cd
We use this command to change our directory.
#pwd
/root/1/2/3/4/5
#cd ..
#cd ../..
#cd –
cp
We use this command to copy the contet from one place to another
place.
-r recursively
-p preserve
mv
We use this command to rename files/directories or to move
files/directories from one location to another location.
Renaming
Moving