3

I am using Precise pangolin. As far as I know, commands like

cd..

or

cd-

are used to browse through folders in the terminal.

But whenever I enter one of this commands, it gives an error saying no such command or filename found. Do I have to perform any additional task before I use commands involving cd?

3
  • 3
    Just to be clear, are you typing cd.. or cd .. Note there is a space. Aug 24, 2012 at 3:32
  • 1
    Why are the downvotes? Looks like a good question for me
    – Sergey
    Aug 24, 2012 at 4:30
  • Can you edit your question to show actual text from the terminal that you're using? Sep 5, 2013 at 19:25

3 Answers 3

15

Common Commands

View Directories: ls

The ls (LiSt) lists files in different colors with full formatted text

Create Directories: mkdir (directory name)

The mkdir (MaKeDIRectory) command will create a directory.

Change Directories: cd (/directory/location)

The cd (ChangeDirectory) command will change from your current directory to any directory you specify.

Copy Files/Directories: cp (file or directory name) (to directory or filename)

The cp (CoPy) command will copy any files you specify. The cp -r command will copy any directories you specify.

Remove Files/Directories: rm (file or directory name)

The rm (ReMove) command will delete any filename you specify. The rm -r command will remove any directory you specify.

Rename Files/Directories: mv (file or directory name)

The mv (MoVe) command will rename/move any file or directory you specify.

Find Files/Directories: locate (file or directory name)

to go back to previous directory: cd ..(cd [space] ..)

just for extra information

source from http://linux.about.com/od/ubuntu_doc/a/ubudg24t7.htm

7

To browse directories you use cd dirname. So if you're in your Home and you want to go to Downloads you type cd Downloads ,if you want to go to a folder inside it you do the same again cd subFolder. If you want to go to a specific folder you type cd Downloads/subfolder/folder2/.

If you're in another folder that isn't inside your Home folder structure but want to go to a folder inside of it (Home) you add this character ~ so it's something like this:

user@user-desktop:etc/$ cd ~/Downloads/subFolder/folder2/

user@user-desktop:~/Downloads/subFolder/folder2/$

That will take you directly to a folder inside your Home structure because of the ~.

To return to your Home you just type cd. To go up 1 directory you type cd ..

2
  • Thanks Uri for the elaborate reply. The problem is I know most of the commands for browsing, but whenever I am entering them in my terminal (of Precise Pangolin) it just says "cd..:command not found" as if such command(s) do(es) not exist. Is that a problem with my ubuntu installation or my terminal or do I need to install some app or do something else before I use those commands or they have changed the commands in Ubuntu 12.04 in some significant way?
    – Della
    Aug 27, 2012 at 3:12
  • You're typing cd... it doesn't exist it's cd -space- .. Aug 27, 2012 at 3:25
0

Make sure that you do put space between cd and .. like this cd ..

cd represents change directory.

cd .. is used to go back from child directory to parent directory.

You can check your current directory using pwd (present working directory).

Type ls -l it will list all the files and directory. Use cd and you will be directed in specified directory.

for more help type man cd

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .