Knowledgebase: Using Shell (SSH)
How can I manipulate a directory in shell?
Posted by Pacific Host on 04 December 2011 05:13 PM
There are far more commands than these but here are a few to get your started:

In order to keep track of the possibly millions of files on-line, Unix systems have a directory tree, which enables meaningful classification of files. For example, the most essential system programs are kept in /bin/, user home directories are all under /home/, and everything having to do with the WWW is under /www/. More specifically, your home directory is /home/you/ and the directory for your WWW files is /home/you/www/.

pwd This prints out your working directory: where you are. When you give a filename to a command without specifying some other directory, the filename is looked up, manipulated, or created in your current working directory.

mkdir flintstones
This makes a subdirectory of the current directory named flintstones.

cd flintstones
This changes the directory to the subdirectory named flintstones.

cd /home/domain/www/flintstones
This changes the directory to the home directory of the flintstones.

cd /home/flintstones/www
This changes the directory to the WWW directory of the flintstones.

With no arguments, cd returns you to your home directory.

rmdir flintstones This removes the subdirectory flintstones. The directory must be empty for this to work.
(0 vote(s))
Not helpful

Comments (0)