Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Spaces allowed in-between words in a file?

  1. #1

    Default Spaces allowed in-between words in a file?

    Hi,

    My first post here so hello to all.

    I tried Suse five or six years ago and ran into an issue that was not comfortable to work with so I went back to windows. The problem was open spaces between words was not permitted with my music files. I have transferred all of my CDs and LPs to MP3 and have a tremendous number of them and the Suse of five years ago required I convert a title like Foggy Mountain Special.mp3 into something resembling Foggy_Mountain_Special.mp3

    I don't care to convert literally a hundred thousand titles to fit the latter format. Does the current version of Suse allow the use of spaces between the words or is the 'no open space' convention still required?

    Thanks for the interest,

    Gary

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,746

    Default Re: Spaces allowed in-between words in a file?

    You can have spaces but it is not recommended since when referencing them on the CL you need to put quotes around the paths. But you need to do that on the Windows command line also.

  3. #3
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,450

    Default Re: Spaces allowed in-between words in a file?

    It does depend on what applications you use; I rarely find having spaces in a filename is a problem with individual files but having spaces in folder names can upset those programs, particularly longstanding Unix programs, which do not accept spaces anywhere in a fully expressed filename.

    The problem I encounter more frequently is with things which were created on a non-Unicode system which are not always compatible with a Unicode based system.

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Spaces allowed in-between words in a file?

    Space has always been a legal character in pathnames on Unix/Linux, but their use makes life more hassle in the CLI. Some programs and shell scripts aren't sufficiently robust to deal with them correctly.

  5. #5

    Default Re: Spaces allowed in-between words in a file?

    john hudson wrote:
    > It does depend on what applications you use; I rarely find having spaces
    > in a filename is a problem with individual files but having spaces in
    > folder names can upset those programs, particularly longstanding Unix
    > programs, which do not accept spaces anywhere in a fully expressed
    > filename.


    That's nonsense. Unix has always allowed spaces in names. DOS and
    Windows didn't. Many Unix and GNU/Linux filesystems also allow lots of
    other strange characters such as backspace and newline. It used to be a
    great sport creating such files and leaving them around for newbies to
    try to clear up.

    The usual problem on modern systems is lazy people who forget the need
    for quotes, either on the command line or in scripts that may be part of
    applications. All of these occurrences are bugs that need to be
    squashed. Reports of specific problems rather than vague generalizations
    are needed.

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,157

    Default Re: Spaces allowed in-between words in a file?

    I am with djh-novell here. And for the practical way of live with spaces in filenames (and not in files as the OP originaly expressed it), I have lots of them. Using the GUI gives no problem at all. Using the CLI they are most often easily "typed" by using the file name expansion feature of the shell. Type the first few characters, hit the Esc key and see how you long file name including the spaces (escaped by a \) is completed (as far as it is unique).

    And yes, programming scripts is not that easy as it looks. For a good script you should cater for white space in fields, else you have a bug again
    Henk van Velden

  7. #7

    Default Re: Spaces allowed in-between words in a file?

    @megalomando, yes now are allowed spaces in filenames, I have all my mp3 names with spaces :-)

  8. #8

    Default Re: Spaces allowed in-between words in a file?

    Thanks for the replies. I've been a musician for 50 years and the ability to play and work with music files as their names exist is mandatory if I am to consider switching platforms. I enjoyed experimenting with Suse from 5 years ago but having to rename all music file names as one word was much too impractical to do and when I would play them on my Cd player, I didn't like the look of the underscores in-between words.

    I'll devote a drive to Suse and give it another go. I don't recall if Suse can read/write NTFS formated drives but all mine are NTFS as several files I have are well over 4GB.

    Thank you all for the information.

  9. #9
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,064

    Default Re: Spaces allowed in-between words in a file?

    On Thu, 13 Jan 2011 10:05:48 +0000, Dave Howorth wrote:

    > That's nonsense. Unix has always allowed spaces in names. DOS and
    > Windows didn't.


    Well, it's not entirely nonsense. While the filesystem has always
    supported spaces, not all programs deal with them gracefully (especially
    scripts). Similarly, I can start a filename with "-" but then if I do
    something like try to delete it, I have to jump through hoops because the
    shell (since rm is builtin to most shells) tries to apply it as a command-
    line switch.

    And while FAT16 doesn't support spaces, FAT32 does - so it's not accurate
    to say DOS and Windows don't support spaces in filenames, because they
    have since at least Win95 as I recall (with long filename support
    enabled).

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,157

    Default Re: Spaces allowed in-between words in a file?

    Not only spaces. This is a filename on my system:
    Code:
    henk@boven:~> l Franais\,\ Espaol\,\ Ελληνικό\,\ Русский\,\ हिनदी\,\ اردو\,
    -rw-r--r-- 1 henk wij 0 jan 13 19:33 Franais, Espaol, Ελληνικό, Русский, हिनदी, اردو,
    henk@boven:~>
    And I creted the l statment by typing l Fra and then hittting the Esc key.

    The only characters that can not be in a file name are the / (it serves as the separator in the path) and the NULL character. Also better do not start a file name with a hypen -.

    When you are using a non-Linux filesystem, there may be other restrictions/problems because those file systems lack some of the features native Linux file systems have. And not all of this can be faked/converted by the Linux software that interfaces to them.
    Henk van Velden

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •