Hadoop Linux
commands
ls – Listing Directory
ls ⇒ directory listing
• ls -al ⇒ formatted listing with hidden files
cd – change directory
cd dir ⇒ change directory to dir
cd ⇒ change to home
Pwd – current working directory
pwd ⇒ shows current directory
mkdir dir ⇒ create a directory dir
touch -create or update file
touch file ⇒ create or update file
rm file ⇒ delete the file
rm -r dir ⇒ delete directory dir
rm -r dir ⇒ delete directory dir
rm -f file ⇒ force remove the file
rm – force to remove directory
rm -rf dir ⇒ force remove directory dir *
cp - Copy a file
cp file1 file2 ⇒ Copy file1 to file2
cp – copy a directory
cp -r dir1 dir2 ⇒ copy dir1 to dir2; create dir2 if it is not present.
mv – rename or move the file1 to
file2
mv file1 file2 ⇒ rename or move file1 to file2 if file2 is an
existing directory, moves file1 into directory file2
ln -create a symbolic link to file
ln -s file link ⇒ create a symbolic link to file
cat - places standard input into
the file
cat > file ⇒ places standard input into the file
more - output the contents of the
file
more file ⇒ output the contents of the file
Permission Commands:
sudo ⇒ temporarily become the superuser
chmod - modify file access rights
chmod ⇒ modify file access rights
Step 1
Step 2
System Info Commands :
date ⇒ shows the current date and time
cal ⇒ show this month’s calendar
uptime ⇒ show current uptime
w ⇒ display who is online
whoami ⇒ who you are logged in as
finger user ⇒ display information about user
man command ⇒ show the manual for command
System Info Commands :
df ⇒ show disk usage
du ⇒ show directory space usage
free ⇒ show memory and swap usage
whereis app ⇒ show possible locations of app
which app ⇒ show which app will be run by default