Beware of spaces in volume names

Many, many install scripts have failed during my upgrade due to having a volume name with a space in it. If you have any non unix compatible characters in your volume name be sure to rename the volume before upgrading.

Hi David,
   One method for handling spaces is to simply remove their role as a field separator. I like to restore the field separator after I'm through with the alteration, although that's not required for this simple example. Here's one way of doing what you want:
<PRE>#!/bin/sh
DIRS='Folder 1
Folder 2'
echo $DIRS; echo
OLDIFS="$IFS"
IFS=$'\n'
for dir in $DIRS
do
IFS="$OLDIFS"
echo "Here is a directory"
echo $dir
done</PRE>
Since the DIRS variable now contains a newline, I've added an additional echo statement to verify that two passes through the loop were in fact occurring. Of course you don't have to use a newline as a field separator. Any character that is not allowed in a filename will suffice.
   I apologize for the late reply; I hope you're still listening. I just learned of this discussion. The discussion now called "UNIX" used to be named "Command Line". I didn't realize until this week that Apple had created a second one.
Gary
~~~~
   We are what we pretend to be.
         -- Kurt Vonnegut, Jr.

Similar Messages

  • Automator "Connect to Server" doesn't work with spaces in volume name

    I'm trying to use an old Automator Workflow I had set up in Snow Leopard that connected to a list of specified server mounts (both Windows smb:// and Apple afp://). It works fine for most of them, until it hits a mount point that has a space in it, where it fails. Looking at the debug area it looks like it's trying to connect to "smb://Server/Example%20Name" instead of "smb://Server/Example Name" and failing. Yet, when I use the "Connect to Server…" functionality in Finder, the same URL works just fine. Is there any syntax that will make this work correctly in Automator?

    As I said I never used this before Lion and I don;t have any smb shares to test on but this is what I've found which may be of help:
    The following workflow connects to my MB from an iMac:
    Notice that the MB name is administrator's MacBook with a space and an apostrophe. Notice the %chars for the space and the apos so I don't think that the %20 for the space in your case is causing the problem.
    When I tried this by entering afp://administrator's MacBook it failed. The error message showed the special chars converted as in the url that worked what was missing was the everything after the _ in the name.
    When I did a connect to server in the Finder and selected Recent servers from the pull down and selected administrator's MacBook the url in the action above was shown. I copied the url from the server address line and pasted into the Automater action.
    This might be of some help in your case at least it might show if the %20 is really causing the problem.
    regards

  • Can't import photos from camera -"Insufficient disk space on volume"?

    Please excuse my ignorance if there is a fix for this that I haven't found here.... I reinstalled iLife '11 yesterday because iPhoto would not recognize the camera. Now it recognizes the camera but it won't import the photos. I've tried all the suggestions, trashed the cache, the preference file, restarted, created a new library and I still can't import the photos from the camera to iPhoto because it says "insufficient disk space on volume." I have plenty of space on my hard drive. I can import through Image Capture but why go the extra step when importing to iPhoto was so very easy before? Can anyone help with this?

    This has been reported - not sure if there ever was a solution or not - search the forums to find the threads
    you can try renewing the iPhoto preference file to see if that helps -
    A good general step for strange issues is to renew the iPhoto preference file - quit iPhoto and go to "your user name" ==> library ==> preferences ==> com.apple.iPhoto.plist and trash it - launch iPhoto which creates a fresh new default preference file and reset any personal preferences you have changed and if you have moved the iPhoto library repoint to it. This may help
    This does not affect your photos or any database information (keywords, faces, places, ratings, etc) in any way - they are stored in the iPhoto library - the iPhoto preference file simply controls how iPhoto works - which is why renewing it is a good first step.
    LN 

  • Start Up Manager not showing Volume names?

    I have a G4 DA 800 with 10.5.8 on the main IDE and two partitions , one for OS 9 and one for 10.3.9 Volumes on a FW 400 Drive.
    Everything runs pretty well except when I've been using Start Up Manager (Option Boot) the names of the Volumes are not there. There's only an X or the Finder for OS 9 and for the Volume names there is only a small cursor line.
    Is there a way to get the Volume names to appear again in Start Up Manager?
    Thank you!
    -Mike

    Hi, Mike -
    In Startup Manager the volume names are read before any OS is loaded, of course, so the cause should not be OS-specific.
    Try resetting the PRAM on the affected machine.
    Do the proper names appear on the desktop when the machine is booted to OS 9?
    If the names are longer than 31 characters, then they could be misread. OSX has a software solution to allow longer filenames, but OS 9 and the machine's hardware modes do not. There might also be an issue with non-text characters (other than a space, comma, or period) interfereing.
    If all else is good, try renaming the volumes while the machine is booted to OS 9 - there may be a difference in OS 9 vs. OSX regarding how the names are stored, hence accessed by the machine while in hardware mode.

  • Old volume names still appears on client

    Dear reader,
    Hopefully a simple question. After changing the volume name on the server the old name still appears on the client using df. I am not sure it is a big problem but as I have also other problems, this one is may be easy to fix and potentially related.
    The old name was MiniMax HD and is changed to MiniMaxHD. ( I will never put spaces in a volume name again)
    See also attached result of df from the client. The volumes on the server ore correct.
    Thanks
    PS do not hesitate if you have other comments on this volume list as I also have other problems.
    Filesystem 512-blocks Used Available Capacity Mounted on
    /dev/disk0s2 116538416 96683640 19342776 84% /
    devfs 215 215 0 100% /dev
    map -hosts 0 0 0 100% /net
    map auto_home 0 0 0 100% /home
    map -fstab 0 0 0 100% /Network/Servers
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Users
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Users4
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Users3
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Users2
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Users1
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Volumes
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Volumes/MiniMax HD
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Volumes/MiniMaxHD
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Volumes/MiniMaxHD/Users5
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Volumes/MiniMaxHD/Gedeeld
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Volumes/MiniMaxHD/Familie
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Volumes/MiniMax HD/Users5
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Volumes/MiniMax HD/Gedeeld
    trigger 0 0 0 100% /Network/Servers/FamilieServer.bHome.LAN/Volumes/MiniMax HD/Familie
    afp_0vJT9J4wOjrt0bq9vm1LVzpC-1.2d00001b 233769824 38169992 195599832 17% /Network/Servers/FamilieServer.bHome.LAN/Users1

    The problem still exists. It is even worse as the external disk gave up and I bought a different one with a different name.
    Where is this information generated or stored. Even in finder I get different paths if I go through Network or Volumes here it should be the same.
    Any hints??

  • SYMLINK won't work with space in folder name

    Using Terminal commands, I can create a SYMLINK for OS folder if there is no space in folder name, such as -
    sudo rm -rf  ~/Library/Mail/
    ln -s /Volumes/Mr._Mac/Mail/ ~/Library/Mail
    But if there is a space in the OS folder name, commands won't work, such as -
    sudo rm -rf  ~/Library/Application Support/AddressBook/
    ln -s /Volumes/Mr._Mac/AddressBook/ ~/Library/Application Support/AddressBook
    Terminal returns the following message -
    ln: Support/AddressBook: No such file or directory
    Is there some sort of symbol that needs to be used instead of a space so that Terminal reads the folder name as one word?
    I've tried % which is used for HTML, but that doesn't work.

    Put the entire path in single quotes or put a \ before each space. If you drag a file or folder from the Finder, it'll automatically supply the correct path.
    (77913)

  • Mplayer can't play files with spaces in their name

    After scratching my head and reinstalling codecs several times without luck, and old memory resurfaced of this occuring before and I managed to solve the problem.
    The thing is that if you doubleclick a file in Nautilus, and said files has spaces in its name, mplayer won't be able to play it, and gives a very cryptic error message, ie "cannot play file a%20b.avi" if the name of the file is "a b.avi".
    The trick is mentioned in this thread -- you edit /usr/share/applications/mplayer.desktop and change 'Exec=gmplayer %U' to 'Exec=gmplayer %F'.
    The bug has been around forever, and hasn't been fixed yet. Perhaps the mplayer devs don't want to fix it. In any case, I would propose that either we fix this in the mplayer Arch package, or that someone more knowledgeable than I get in touch with the devs about it.
    Just a suggestion, but I think it's kind of important. It's really confusing to new users.

    In my opinion, it it's not arch's job to fix bugs from upstream, no matter if it's mplayer or gnome's fault. Of course there are exceptions, eg if a bug in a critical package hardlocks the whole system, or adds a huge security risk.
    I would like to belive that the general arch user is smart enough to find one of the 30 threads about this bug (or the entry on the bugtracker) and fix it themselves. Personaly I would put this in the same category as packages that don't have a .desktop file at all from upstream.
    Oh, and as a small sidenote: http://phraktured.net/patching-patching-patching.html

  • My Macbook pro Early 2008 is randomly slow at starting up and when I am backing up to my time capsule I am receiving the following message 'Time machine could not complete the backup. '' ''The backup disk image ''/Volumes/name time capsule/ my name MacBoo

    My Macbook pro Early 2008 is randomly slow at starting up and when I am backing up to my time capsule I am receiving the following message 'Time machine could not complete the backup. '' ''The backup disk image ''/Volumes/name time capsule/ my name MacBook Pro (4).sparsebundle'' could not be accessed (error-1).
    Problem started after deleting parrell desktop and window7 ?
    Please help?

    Look at the more like this column on the right.. this is the most frequently asked question in this discussion area.
    Reboot the TC.. restart the whole network if the simple reboot did not work.. start in order. modem.. router/TC.. clients. 2min gap.
    Read C12 here. http://pondini.org/TM/Troubleshooting.html

  • "A Bad Filename or volume name encountered" ?!!!

    I searched but I didnt find an answer for this problem. I get the message "Bad Filename or volume name encountered" when I try to play a video file with Quicktime. When I try to add it to my playlist on iTunes it doesnt add it. All of this happened after I converted the file to a Quicktime format (.mov). Also I tried to convert it to iPod video format (.mp4) and the same thing happened. I actually converted some other files to those two formats and they worked. I changed the video size and frame rate and the audio bit rate , sample rate, channel around to match the iPod requirements but it still didnt work. Does anyone know what I should do?!
      Windows XP  

    actuially providing as much detail is best to get an answer. Like what are you missing? Where did you get this video from? what did you use to convert the video? Did you follow the instrucitons to convert the video to a .mov format and then to a .mp4 format? You see as much information is best to get an educated answer. Since your new here you didnt know that so your ok. And you did something MANY people dont seem to do and thats actually search b4 you posted.
    Thanks
    GFF

  • Export of schema with space it its name

    we have a schema named "Gestion Loaners" (note the space in schema name) in oracle 9iR2 database. i want to take schema level export but as there is space in schema name i am not able to do it using either escape char or using parameter file..
    can anyone guide me pls
    thx

    It works if the Username is ALL CAPITALS. Couldn't get it work if the Username was Mixed Case
    SQL> create user "PAVAN KUMAR" identified by pavan;
    User created.
    SQL> grant create session, create table to "PAVAN KUMAR";
    Grant succeeded.
    SQL> create table "PAVAN KUMAR".his_table (col_1 varchar2(5));
    create table "PAVAN KUMAR".his_table (col_1 varchar2(5))
    ERROR at line 1:
    ORA-01950: no privileges on tablespace 'USERS'
    SQL> alter user "PAVAN KUMAR" quota unlimited on USERS;
    User altered.
    SQL> create table "PAVAN KUMAR".his_table (col_1 varchar2(5));
    Table created.
    SQL>
    ora10204>exp hemant/hemant owner=\"PAVAN KUMAR\"
    Export: Release 10.2.0.4.0 - Production on Wed Nov 5 22:33:47 2008
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Export done in US7ASCII character set and AL16UTF16 NCHAR character set
    server uses WE8ISO8859P1 character set (possible charset conversion)
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user PAVAN KUMAR
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user PAVAN KUMAR
    About to export PAVAN KUMAR's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . about to export PAVAN KUMAR's tables via Conventional Path ...
    . . exporting table                      HIS_TABLE          0 rows exported
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting operators
    . exporting referential integrity constraints
    . exporting triggers
    . exporting indextypes
    . exporting bitmap, functional and extensible indexes
    . exporting posttables actions
    . exporting materialized views
    . exporting snapshot logs
    . exporting job queues
    . exporting refresh groups and children
    . exporting dimensions
    . exporting post-schema procedural objects and actions
    . exporting statistics
    Export terminated successfully without warnings.
    ora10204>

  • Music files moved to a new network drive with a new volume name

    I had to replace my old network attached harddisk which held all my music ( mainly mp3 ) files. This drive was automounted and had the name "MUSICHD". My new network attached storage device ( LACIE Ethernet Disk mini 500GB ) has the volume name "SHARE" and it's not possible to change it.
    I copied all the files onto the the new drive, but now I have to tell iTunes that the files are not longer on a volume called MUSICHD. Could somebody be so kind and give me an advice how to do it. Shure I could re-import all the music files, but I don't like to loose all my ratings, playlists, etc.
    -wolfgang
    PowerMac G5   Mac OS X (10.4.3)   iPod 5G

    to be precise. I don't let iTunes manage my files. All my mp3 files are on a NAS ( Network Attached Storage ) device ( it's a 300 GB Harddisk with a 1GBit network connection from Buffalow ).
    If I add mp3 files to my library I first copy it to the NAS device and than drag and drop the files to the iTunes library. So iTunes only manages the links to that files. Files are not imported or copied to/with iTunes.
    Now I have to replace that NAS device by another one. Due to this replacement I have to change the network volume-name of the device. This share is part of the link in the iTunes database for each file.
    If you look into the xml file you'll find something like this:
    <key>Location</key><string>file://localhost/Volumes/SHARE/MUSIK/Blues/Dupree,%20Champion%20Jack/Blues%20From%20the%20Gutter/Dupree,%20Cha mpion%20Jack%20-%20Blues%20From%20the%20Gutter%20-%2001%20-%20Strollin'.mp3</str ing>
    So the "simple" question is. How to tell iTunes that all my music files are now on another volume?
    -Wolfgang

  • IPhoto can't find original photos after volume name change

    I had to reformat my drive and do a fresh install of Mountain Lion. I was pleased that the Migration Assistant imported all the user accounts, apps, etc. from a Time Machine backup. Never could have done *that* with Windows...
    However, in iPhoto, I *do not* copy pictures from my Pictures folder into the iPhoto library and iPhoto can't find them. I expect that this is because I changed the volume name when I reformatted the drive, which is embedded somewhere in the iPhoto package in my Pictures folder.
    Does anyone know which iPhoto files I can edit or batch edit to change references from the old volume name to the new one? Is this information stored in text or XML files that I can edit or is it embedded in binary files? I thought I might be able to reimport the photos from the current volume and iPhoto would sort out the duplicates (not a great option if I get prompted for each one though...) but I wasn't sure if that would preserver events, faces, etc.
    When I try to rebuild the iPhoto library, I get a dialog indicating each file cannot be found on the volume. While it provides an option to browse for the location, this isn't practical due to the 1000's of photos and movies on the drive.
    Any help would be appreciated. Thanks in advance!

    As OT says, the primary reason not to run a Referenced Library, and, most especially, not one where you have the Library on one Volume and the photos on another.
    You're going to have this problem again and again any time you make a change to your hardware set up - including upgrading your machine and so on.
    Going forward: Do you have Aperture? This has a command to Locate Referenced Masters which should help. Other than that, how are you at hacking SQL databases? That's what this guy did:
    https://discussions.apple.com/thread/3216539?tstart=30
    back up first...
    Regards
    TD

  • IWeb and uploading jpegs with spaces in their names

    I have created a site with about 100 jpegs that I wish to load up to a server other than ".Mac". Some jpegs have spaces in their names, so "Fetch" will not upload them. I deleted the spaces from their names and loaded the jpegs back into the site and saved and published to a folder. However, the resulting "Site"folder shows the jpegs still have spaces in their names, even though I removed them from the name of the jpeg. IWeb must be getting the name from some internal tag or something. For example, I had a jpeg called "Billie Holiday.jpg" I changed the name to "BillieH.jpg", but when I publish the site to a folder, the jpeg still shows up as "Billie Holiday.jpg" and therefore I cant upload it using "Fetch". Where is iWeb getting the names of the jpegs from, and how do I remove the spaces? Or, does anybody know of an application that can upload files (ftp) with spaces in their names?
    Thanks,
    Mitch

    However, the resulting
    "Site"folder shows the jpegs still have spaces in
    their names, even though I removed them from the name
    of the jpeg.
    Very strange. You might try renaming the site with Inspector to something else than Site and republishing, to guarantee you have a totally new set of files.
    Or, does
    anybody know of an application that can upload files
    (ftp) with spaces in their names?
    It's not the ftp program. You can't have spaces in file names on most web servers, they won't accept the files.

  • Spaces In Property Names

    It is a known restriction that DIAdem, and DataFinder coerce spaces to underscores when searching for property names on TDMS files.  The Excel Add-in does something similar.
    But the TDMS file structure and API apparently supports reading and writing properties with spaces in them.  So my question is why does DIAdem and DataFinder not support spaces in the name of properties?  This limitation must exist for a reason since if it were a simple fix it probably would have been taken care of years ago, so I'm not asking for this functionality to change just curious.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

    Hi Brad,
    Resurrecting this - it's only a month old, but it's still mild thread necrophilia nonetheless - is there anything in the settings to disable this behaviour if indexing is not of interest to me?
    I ask as I've stumbled onto this feature when trying to tweak a saved NaN value in a LV-generated TDMS before uploading it to an SQL database. On saving, I found the behaviour that Hooovahh describes, plus a few additional properties added. Next time I come across this, having been duly burned this first time out, I'll just do it via LV!
    CLD

  • Quicktime 10 "Save For Web", spaces in file names?

    Maybe I'm overlooking something here, but:
    When using Quicktime 10's "Save for Web" function, it exports movie source files that all have spaces in the filenames (i.e. "Movie - iPhone.m4v" etc)
    Now correct me if I'm wrong, but most web servers DO NOT like having spaces in the filenames, and every time I try to upload them to one of our web servers, I'm getting an error message that says it doesn't like the file.
    Simply removing the spaces from the filenames causes the Quicktime reference movie to stop working, as you might expect.
    Am I missing something here? How would someone possibly get this to work?

    Thanks for the reply - actually it was helpful, and was the final nail in the coffin for Yahoo Webhosting for us. We've been using it for years, and even though it ***** terribly (and I mean TERRIBLY, horribly, painfully), we've stuck with it just because it's been easier to use it than to not switch. But you're exactly right... I tried uploading files to Cachefly with spaces in the name, and bingo, works perfectly.
    Thanks.

Maybe you are looking for