How can I manipulate a directory in shell?

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. You can use "rm -r flintstones" instead to remove the directory and all files in it.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I get SSH access enabled?

If SSH access is not enabled, please open a support ticket and we will activate it for you.

What are some basic Linux shell commands?

filename.txt Same as ls �alR, outputs the results to a filels *.html Lists all files ending with...

How do I change file permissions via SSH?

Using the CHMOD command:The letters u (for user), g (for group), and o (for other) are used with...

What is Telnet/SSH and do you allow it?

For security purposes, we do not enable Telnet at all and we only enable SSH access by request....

What is SCP / SFTP?

SCP and SFTP are both part of OpenSSH, the secure shell server we run. Do note that you cannot...