Saturday, February 16, 2013

Some basic UNIX commands

Today I will write down some basic UNIX commands.
"cd -" will switch you to the previous directory.
testuser@test:~/Downloads$ cd ../Desktop/
testuser@test:~/Desktop$ cd -
/home/testuser/Downloads
testuser@test:~/Downloads$ 

"cd ~" or "cd" will switch you to your home directory.
testuser@test:~/Downloads$ cd ../Desktop/
testuser@test:~/Desktop$ cd -
/home/testuser/Downloads
testuser@test:~/Downloads$ 

"pwd" (print working directory) is used to output the path of the current working directory.
testuser@test:~/Desktop$ pwd
/home/testuser/Desktop