Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Navigation of Directories Navigation of Directories

To
Tochange
changethe
thedirectory
directory To
Tochange
changedirectory
directoryto
tolast
lastworking
workingdirectory
directory
[root@comp1
[root@comp1 ~]# cd <path of thedirectory>
~]# cd <path of the directory> [root@comp1 ~]# cd –
[root@comp1 ~]# cd –

To
Tochange
changedirectory
directoryto
tohome
homedirectory
directory
To
Tochange
changedirectory
directoryone
onelevel
levelback
back [root@comp1 ~]# cd or
[root@comp1 ~]# cd or
[root@comp1 ~]# cd ..
[root@comp1 ~]# cd .. [root@comp1 ~]#cd
[root@comp1~]# cd ~
~

To
Tochange
changedirectory
directorytwo
twolevels
levelsback
back
[root@comp1
[root@comp1~]#
~]#cdcd../..
../..

Removing a File or Directory Copying a File or Directory

To
Toremove
removeaafile
file
[root@comp1 ~]# rm <filename>
[root@comp1 ~]# rm <filename>
To
Tocopy
copyaafile
file
[root@comp1
[root@comp1 ~]# cp <sourcefile
~]# cp <source filepath>
path><destination
<destinationfile
filepath>
path>

To
Toremove
removeempty
emptydirectory
directory
[root@comp1
[root@comp1 ~]# rmdir <directoryname>
~]# rmdir <directory name>

To
Tocopy
copyaadirectory
directory
[root@comp1
[root@comp1~]#
~]#cp
cp –r
–r <source
<sourcedir
dirpath>
path> <destination
<destinationdir
dirpath>
path>

To
Toremove
removedirectory
directoryrecursively
recursivelyand
andforcefully
forcefully
[root@comp1
[root@comp1~]#
~]#rm
rm –rf
–rf <directory
<directoryname>
name>

You might also like