LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how do I navigate to the downloads folder in the terminal? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-navigate-to-the-downloads-folder-in-the-terminal-4175497723/)

Gregg Bell 03-10-2014 04:34 PM

how do I navigate to the downloads folder in the terminal?
 
I've tried but just can't seem to get there. Thanks!

Habitual 03-10-2014 04:56 PM

Code:

cd Downloads
NOTE: it's case sensitive.
you can also use cd Down<tab><enter> and let the terminal auto-complete it for you. :)

Gregg Bell 03-10-2014 06:20 PM

1 Attachment(s)
Quote:

Originally Posted by Habitual (Post 5132238)
Code:

cd Downloads
NOTE: it's case sensitive.
you can also use cd Down<tab><enter> and let the terminal auto-complete it for you. :)

Thanks Habitual, but that's what I tried before without any luck. (see screenshot) Am I doing something wrong?

TroN-0074 03-10-2014 07:10 PM

try it like this
Code:

cd /home/gregory/Downloads
Once you get to the downloads directory to see your files there type
Code:

ls -l
the -l is a small L not a number 1

good luck to you.

yancek 03-10-2014 07:16 PM

The reason you got the error is because you were in the /home/user/Desktop directory and there is no Downloads sub-directory there, so what TroN-0074 said should get you there from anywhere.

lleb 03-10-2014 07:24 PM

might not be a bad idea to learn a few basic CLI commands:

cd = change directory, keeping in mind that Linux requires full path sourcing.

ls = list with several options, -l is long, -a is all (show hidden directories) -F gives details about the type of file/directory you are looking at. those are the three i put into an alias

Code:

alias d='/bin/ls -laF'
alias dird='/bin/ls -laFp | grep /'

this gives a faster way to get a long list by just hitting 'd', and if i ONLY want a list of directories, like in MS Dos i can use the 'dird' shortcut.

also with the cd command the use of .. moves you up one layer in the tree:

Code:

[user@centos ~]$ pwd
/home/user
[user@centos ~]$ cd ..
[user@centos home]$ pwd
/home

pwd = show the current path were you are residing in the file system.

as TroN-0074 pointed out about, your Download directory is located in the root of your /home/user/ directory, not in your Desktop path.

from your desktop you could use the .. I showed above as follows:

Code:

cd ..
ls -laFp | grep /

to look for your Download directory. Then you can use the shortcut information provided above.

as I dont have a Desktop directory Ill show you from my Pi directory:

Code:

[user@centos Pi]$ d
total 24
drwxrwxrwx.  4 user user 4096 Dec 12 18:02 ./
drwxr--r--. 20 user user 4096 Mar 10 20:24 ../
-rwxrwxrwx.  1 user user 6148 Dec 12 18:02 .DS_Store*
drwxrwxrwx.  2 user user 4096 Feb 15  2013 rpfr-17-xfce-r1/
drwxrwxrwx.  2 user user 4096 Feb 15  2013 rpfr-17-xfce-r2/
[user@centos Pi]$ pwd
/home/user/Pi

[user@centos Pi]$ cd ..
[user@centos ~]$ pwd
/home/user

[user@centos ~]$ dird
drwxr--r--. 20 user  user      4096 Mar 10 20:24 ./
drwxrwxrwx.  7 root root      4096 Feb  2  2013 ../
drwxrwxrwx.  3 user  user      4096 May 18  2013 .cache/
drwxrwxrwx.  4 user  user      4096 May 18  2013 .config/
drwxrwxrwx.  6 user  user      4096 Feb  7  2013 Friday/
drwxrwxrwx.  6 user  user      4096 Feb  7  2013 Monday/
drwxrwxrwx.  4 user  user      4096 Dec 12 18:02 Pi/
drwxrwxrwx.  6 user  user      4096 Feb  7  2013 Saturday/
drwx------.  2 user  user      4096 Jan 23 19:47 .ssh/
drwxrwxrwx.  6 user  user      4096 Feb  7  2013 Sunday/
drwxrwxrwx.  6 user  user      4096 Feb  7  2013 Thursday/
drwxrwxrwx.  6 user  user      4096 Feb  7  2013 Tuesday/
drwxrwxrwx.  6 user  user      4096 Jan  8 18:18 Wednesday/
[user@centos ~]$ cd Saturday/
[user@centos Saturday]$ pwd
/home/user/Saturday

boy i need to fix my permissions in that directory :D.

Gregg Bell 03-10-2014 07:31 PM

thanks
 
Quote:

Originally Posted by TroN-0074 (Post 5132299)
try it like this
Code:

cd /home/gregory/Downloads
Once you get to the downloads directory to see your files there type
Code:

ls -l
the -l is a small L not a number 1

good luck to you.

Yep. Did the trick! Thanks.

Gregg Bell 03-10-2014 07:33 PM

Quote:

Originally Posted by yancek (Post 5132302)
The reason you got the error is because you were in the /home/user/Desktop directory and there is no Downloads sub-directory there, so what TroN-0074 said should get you there from anywhere.

Thanks yancek. Your explanation helped. I was able to navigate to different files too. Appreciate it.

Gregg Bell 03-10-2014 07:37 PM

Quote:

Originally Posted by lleb (Post 5132307)
might not be a bad idea to learn a few basic CLI commands:

cd = change directory, keeping in mind that Linux requires full path sourcing.

ls = list with several options, -l is long, -a is all (show hidden directories) -F gives details about the type of file/directory you are looking at. those are the three i put into an alias

Code:

alias d='/bin/ls -laF'
alias dird='/bin/ls -laFp | grep /'

this gives a faster way to get a long list by just hitting 'd', and if i ONLY want a list of directories, like in MS Dos i can use the 'dird' shortcut.

also with the cd command the use of .. moves you up one layer in the tree:

Code:

[user@centos ~]$ pwd
/home/user
[user@centos ~]$ cd ..
[user@centos home]$ pwd
/home

pwd = show the current path were you are residing in the file system.

as TroN-0074 pointed out about, your Download directory is located in the root of your /home/user/ directory, not in your Desktop path.

from your desktop you could use the .. I showed above as follows:

Code:

cd ..
ls -laFp | grep /

to look for your Download directory. Then you can use the shortcut information provided above.

as I dont have a Desktop directory Ill show you from my Pi directory:

Code:

[user@centos Pi]$ d
total 24
drwxrwxrwx.  4 user user 4096 Dec 12 18:02 ./
drwxr--r--. 20 user user 4096 Mar 10 20:24 ../
-rwxrwxrwx.  1 user user 6148 Dec 12 18:02 .DS_Store*
drwxrwxrwx.  2 user user 4096 Feb 15  2013 rpfr-17-xfce-r1/
drwxrwxrwx.  2 user user 4096 Feb 15  2013 rpfr-17-xfce-r2/
[user@centos Pi]$ pwd
/home/user/Pi

[user@centos Pi]$ cd ..
[user@centos ~]$ pwd
/home/user

[user@centos ~]$ dird
drwxr--r--. 20 user  user      4096 Mar 10 20:24 ./
drwxrwxrwx.  7 root root      4096 Feb  2  2013 ../
drwxrwxrwx.  3 user  user      4096 May 18  2013 .cache/
drwxrwxrwx.  4 user  user      4096 May 18  2013 .config/
drwxrwxrwx.  6 user  user      4096 Feb  7  2013 Friday/
drwxrwxrwx.  6 user  user      4096 Feb  7  2013 Monday/
drwxrwxrwx.  4 user  user      4096 Dec 12 18:02 Pi/
drwxrwxrwx.  6 user  user      4096 Feb  7  2013 Saturday/
drwx------.  2 user  user      4096 Jan 23 19:47 .ssh/
drwxrwxrwx.  6 user  user      4096 Feb  7  2013 Sunday/
drwxrwxrwx.  6 user  user      4096 Feb  7  2013 Thursday/
drwxrwxrwx.  6 user  user      4096 Feb  7  2013 Tuesday/
drwxrwxrwx.  6 user  user      4096 Jan  8 18:18 Wednesday/
[user@centos ~]$ cd Saturday/
[user@centos Saturday]$ pwd
/home/user/Saturday

boy i need to fix my permissions in that directory :D.

Thanks lleb. I'm absorbing this stuff little by little. (I'm really just a writer. lol) But I'm getting it. The commands you shared are really helpful.

chrism01 03-11-2014 04:19 AM

You may find this useful http://rute.2038bug.com/index.html.gz

Gregg Bell 03-11-2014 05:10 PM

Quote:

Originally Posted by chrism01 (Post 5132522)
You may find this useful http://rute.2038bug.com/index.html.gz

Thanks Chris, The guide looks great (and exhausting! lol) but maybe I should focus on a Ubuntu guide because I'm using Xubuntu?

lleb 03-12-2014 03:22 AM

Quote:

Originally Posted by Gregg Bell (Post 5132854)
Thanks Chris, The guide looks great (and exhausting! lol) but maybe I should focus on a Ubuntu guide because I'm using Xubuntu?

linux is linux at the core, specifically when it comes to the command line.

brianL 03-12-2014 04:25 AM

Another good site/book for all that CLI stuff:
http://linuxcommand.org/

chrism01 03-12-2014 04:49 AM

Also, just take your time; don't try to learn it all in one day :)

sgosnell 03-12-2014 08:50 AM

Just entering cd<enter> will take you directly to your home directory, no need to enter the /home/username part.


All times are GMT -5. The time now is 06:43 PM.