LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 04-10-2020, 03:17 PM   #1
Davno
Member
 
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 217

Rep: Reputation: 25
a small problem in my script


Hi,
I have this line in a script that used to work, but it needs to be modify because of the new M2 drive named New Volume instead of a UEFI name.
How can i modify the name New Volume, it does not work because of the blank space.
Code:
text x=75 y=815 sensor=disk format="%u" mountpoint="/media/normand/New Volume" color=250,250,250 font="Albany" shadow=1 fontsize=09
Thank you.
 
Old 04-10-2020, 03:24 PM   #2
trewornan
Member
 
Registered: May 2002
Distribution: Ubuntu 20.04
Posts: 35

Rep: Reputation: 23
Is this name defined in /etc/fstab?
 
1 members found this post helpful.
Old 04-10-2020, 03:37 PM   #3
Davno
Member
 
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 217

Original Poster
Rep: Reputation: 25
Quote:
Originally Posted by trewornan View Post
Is this name defined in /etc/fstab?
No, its not in fstab, the /etc/fstab is almost empty, my drives don't show there.
 
Old 04-10-2020, 03:48 PM   #4
dmchess
Member
 
Registered: Jan 2005
Posts: 244

Rep: Reputation: 43
When I mount a portable usb drive to my system, I do an ls on it first and see what the system tells me:

like so:

ls /media/terry

and hen I get output like this:

HP Portable Drive

then is the ls again, except I /H<tab> and then I get something like this:

ls /media/terry/HP\ Portable\ Drive/


Then I can use that string in my bash commands.

Terry
 
1 members found this post helpful.
Old 04-10-2020, 03:49 PM   #5
trewornan
Member
 
Registered: May 2002
Distribution: Ubuntu 20.04
Posts: 35

Rep: Reputation: 23
Have you tried escaping the space:

mountpoint="/media/normand/New\ Volume"

sometimes you might even have to escape it twice:

mountpoint="/media/normand/New\\\ Volume"

no guarantees though.
 
1 members found this post helpful.
Old 04-10-2020, 04:09 PM   #6
trewornan
Member
 
Registered: May 2002
Distribution: Ubuntu 20.04
Posts: 35

Rep: Reputation: 23
Also you could try changing the label/name perhaps to "New_Volume" or similar, there's a previous question on this forum about that:

https://www.linuxquestions.org/quest...tition-628528/
 
Old 04-10-2020, 04:41 PM   #7
Davno
Member
 
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 217

Original Poster
Rep: Reputation: 25
Quote:
Originally Posted by trewornan View Post
Also you could try changing the label/name perhaps to "New_Volume" or similar, there's a previous question on this forum about that:

https://www.linuxquestions.org/quest...tition-628528/
All the other post did not work, so i think i will change the label.
How should i go about it, since the M2 drive has a drive letter in Windows 10 and its called New Volume in Linux.
P.S. It has important data on it.
Thanks

Last edited by Davno; 04-10-2020 at 04:46 PM.
 
Old 04-10-2020, 07:22 PM   #8
trewornan
Member
 
Registered: May 2002
Distribution: Ubuntu 20.04
Posts: 35

Rep: Reputation: 23
sudo apt install parted
parted

then something like:

select /dev/???
print all
name Partition-number New_Volume

**!!!! BUT !!!** - I've never done this myself so you should look up the "parted" command and check it out for yourself, read the help, etc, and if the drive has important data (as you say) BACK IT UP before doing anything.
 
Old 04-10-2020, 07:28 PM   #9
Davno
Member
 
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 217

Original Poster
Rep: Reputation: 25
Disk Utility

I changed the name to New_Volume instead of New Volume, and now my script run.
Thanks
 
  


Reply



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
Need small code/small demo project for USB Pendrive device driver code.(USB Flash ) pratikmota Linux - Kernel 2 07-10-2012 02:03 AM
LXer: DLS <small>[<i>sic</i>]</small> answers user requests with 4.0 alpha LXer Syndicated Linux News 0 07-19-2007 07:46 PM
Small Fonts... Too much small! cubax Debian 3 03-28-2005 11:31 AM
Openldap with small directory very small iholdap Linux - Networking 5 10-04-2003 08:09 AM
3 small problems in 1 small post vzzt! Linux - Software 10 02-27-2003 07:40 PM

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

All times are GMT -5. The time now is 01:26 AM.

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