LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-23-2017, 09:37 AM   #1
borgward
Member
 
Registered: Apr 2005
Location: Austin, Texas
Distribution: Feather, Darn Small Linux
Posts: 347

Rep: Reputation: 17
CD to USB Stick Solved


How do I cd to usb stick? It is /dev/sdb1. It is mounted at /media/tom/USB Stick

Notice there is no _ between USB and Stick

$ cd /media/tom
tom@tom-Inspiron-1520120 /media/tom $ ls
USB Stick
tom@tom-Inspiron-1520120 /media/tom $ cd USB Stick
bash: cd: USB: No such file or directory

I also tried:
$ cd /dev/sdb1
bash: cd: /dev/sdb1: Not a directory

Thats funny as sdb1 shows up in /dev:

$ cd /dev
tom@tom-Inspiron-1520120 /dev $ ls
agpgart disk ... sdb1 ...

Last edited by borgward; 06-23-2017 at 01:28 PM. Reason: Solved
 
Old 06-23-2017, 10:43 AM   #2
Terry Coats
Member
 
Registered: Mar 2017
Posts: 122

Rep: Reputation: 52
I think maybe putting quotes around it might work.

cd /media/tom/"USB Stick"

If it was me I'd rename it and take the space out.
 
Old 06-23-2017, 11:28 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
yes just quote it, but the entire path.
Code:
cd "/media/tom/USB stick"
 
Old 06-23-2017, 11:30 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,320
Blog Entries: 13

Rep: Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372
You can either put quotes around it or use the backslash delimiter:
Code:
$ cd /media/tom/USB\ Stick
This is likely the name of the file system which was created on that stick or a default chosen.

Another thing to examine is the TAB completion:
Code:
$ cd /media/tom/USB[TAB]
# should complete it if it is unique, to show
$ cd /media/tom/USB\ Stick
While you can change the name, Linux in general allows file and directory names with SPACES and other special characters, plus I've encountered a few symbolic language names or characters within file or directory names containing symbolic characters which I cannot type. Using the TAB completion, wildcards, double quotes, and backslash delimiters are very much part of the command line and my point here is that you seem to be using the command line, so I recommend that you consider becoming comfortable with that.

If it were that you tend to use a UI based file manager, then that would not cause you problems similar to these and any need to consider renaming would not be
 
Old 06-23-2017, 01:27 PM   #5
borgward
Member
 
Registered: Apr 2005
Location: Austin, Texas
Distribution: Feather, Darn Small Linux
Posts: 347

Original Poster
Rep: Reputation: 17
All of you peoples suggestion worked!

Thanks

Proceeding to edit the OP as solved.
 
Old 06-23-2017, 01:38 PM   #6
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: USA
Distribution: Lubuntu 14.04, Windows Vista
Posts: 6,277
Blog Entries: 3

Rep: Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841
Quote:
Originally Posted by borgward View Post
Proceeding to edit the OP as solved.
Hi...

Glad the issue was resolved. Another way to mark this thread as "SOLVED" is to click on "Thread Tools" directly above your initial post.

Regards...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Android on a Stick, or how to install Android-x86 on a USB stick LXer Syndicated Linux News 0 03-28-2015 05:10 AM
Hauppauge wintv-hvr h006 - dvb-t tuner - usb-stick - hybrid tv stick Xeratul Linux - Hardware 5 12-23-2012 09:47 AM
LXer: Installing "Sugar on a stick" (Strawberry Release) On A USB Stick LXer Syndicated Linux News 0 08-04-2009 03:50 PM
mount/umount usb stick - PQI Intelligent Stick 2.0 sandbag Linux - Software 5 05-06-2005 11:12 AM
USB problems: Memorex USB stick 256MB and PSX to USB adapter by Radio Shack Knuckles T15 Linux - Hardware 1 05-19-2004 06:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration