terminal question

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
JohnLL
Level 2
Level 2
Posts: 51
Joined: Mon May 11, 2015 6:58 am

terminal question

Post by JohnLL » Sat May 19, 2018 5:44 pm

I have a questions about the command 'cd' in "Terminal".
If I do cd Downloads, it goes to the Downloads folder. If I type in cd Ant Videos it tells me no such file or directory. Can 'cd' show dual named folders? If so what is the format? LS shows them. Did a man page for cd and it says none found.

Here is another question regarding commands in "terminal". If I do sudo "command" I get the following response ----
sudo: unable to resolve host Optiplex780
[sudo] password for "user(me)"
I am able to run/install/make etc under root so it's just a minor annoyance.
I did a google search and found something about this in "askubuntu.com" but reading this left me confused. Too much info but not specific enough for this old brain to follow.
Last edited by JohnLL on Sat May 19, 2018 6:05 pm, edited 1 time in total.

User avatar
slipstick
Level 5
Level 5
Posts: 660
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: terminal question

Post by slipstick » Sat May 19, 2018 5:48 pm

Linux doesn't like spaces in file names. You need to escape the space with a backslash or else enclose the entire name in quotes:

Code: Select all

cd Ant\ Videos
or

Code: Select all

cd "Ant Videos"
In theory, theory and practice are the same. In practice, they ain't.

MrEen
Level 5
Level 5
Posts: 668
Joined: Mon Jun 12, 2017 8:39 pm

Re: terminal question

Post by MrEen » Sat May 19, 2018 5:50 pm

Try cd "Ant Videos"

User avatar
trytip
Level 6
Level 6
Posts: 1424
Joined: Tue Jul 05, 2016 1:20 pm

Re: terminal question

Post by trytip » Sat May 19, 2018 6:05 pm

you can also type cd then drag a folder into terminal and hit enter
Image

JohnLL
Level 2
Level 2
Posts: 51
Joined: Mon May 11, 2015 6:58 am

Re: terminal question

Post by JohnLL » Sat May 19, 2018 6:08 pm

Thank you on the reply to my 'cd' questions. Both suggestions worked and I learned something new.

User avatar
Pierre
Level 16
Level 16
Posts: 6715
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: terminal question

Post by Pierre » Sat May 19, 2018 6:17 pm

if you have a setup thus:
- user
- user/music
- user/documents
- user/videos

and you are currently in /user/music - - and type cd /videos - - that won't work,
as there is no /videos below the /music directory, and so you have to go Up One Level & then Down One level:
- cd /user
- cd /user/videos
you can string those commands together in the one string & run them all at the same time, though.
8)

tis can affect how you extract or run some *tar.gz file that you just downloaded,
if you don't know you actual directory structure - you then get that 'file not found' - error
:(
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

Post Reply

Return to “Software & Applications”