Command |
Usage |
Description |
su |
This is called as switch user .Syntax : su username Example : su auhadoop
| This will help you to change user or switch user |
pwd |
This is called as present working directory .Syntax : pwd Example : pwd
| This will help you to identify your present working directory |
ls |
This is called as List . Syntax : ls /directory_path Example : ls /user/ or ls / |
List the directories or files present in mentioned directory |
cd |
This is called as change directory .Syntax : cd / or cd /Path Example : cd / or cd /user |
This will change directory which ever path you mention after cd |
mkdir |
This is called as make directory .Syntax : mkdir /directory_name Example : mkdir /Input
| This will create a new directory |
touch |
This is called as touch .Syntax : touch /directory_name/file_name Example :touch /user/file1.txt
| This will create a new file |
rmdir |
This is called as remove directory .Syntax : rmdir /directory_name Example : rmdir /Input
| This will remove directory |
rm |
This is called as remove .Syntax : rm /directory_name/file_name Example : rmdir /Input/inputfile.txt
| This will remove file |
chmod |
This is called as change mode .Syntax : chmod 777 /directory_name or file_name Example : chmod 777 /input.txt
|
This will used to provide read , write and execute permission to directory or file . |
cat |
This is called as cat.Syntax : cat /File_name Example :cd /input.txt |
This will show the content of the file . Note : This is only used with files . |
mv |
This is called as move.Syntax : move /Sourcefolder/file_name /Targetfolder Example :mv /user/file1.txt /test/ |
This will move file from one directory to another directory / This will also be used to rename the file Syntax : move Currentfilename newfilename Example : mv fileold.txt filenew.txt |
cp |
This is called as copy.Syntax : copy filepath /destination_directory_path Example :cp /input.txt /test/ |
This will copy file to new location |