Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Renaming a file via terminal

  1. #11
    Join Date
    Jul 2010
    Location
    You'll never know.
    Beans
    39
    Distro
    Ubuntu 10.04 Lucid Lynx

    Arrow Re: Renaming a file via terminal

    Quote Originally Posted by AlphaLexman View Post
    If a directory has a 'space' in it, you will need to put a backslash \ in front of the space.
    should be:
    Code:
    john@john-desktop:~$ cd ~/Desktop/Wiki\ Images
    Sorry for the long response wait. Something came up...

    Tried that code and it put me in the folder. Now what?

    Code:
    john@john-desktop:~/Desktop/Wiki Images$

  2. #12
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,658
    Distro
    Ubuntu

    Re: Renaming a file via terminal

    Now do the mv command, not forgetting to escape the spaces with a \

    Code:
    files\ and\ directories\ with\ spaces\ need\ these
    Code:
    "or quotes around them"

  3. #13
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    5,443
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Renaming a file via terminal

    It might be easier to use quotes than backspaces for filenames with spaces, though either approach is valid:
    mv filename\ with\ spaces.svg filename\ with\ spaces.jpg
    mv 'filename with spaces.svg' 'filename with spaces.jpg'

  4. #14
    Join Date
    Jul 2010
    Location
    You'll never know.
    Beans
    39
    Distro
    Ubuntu 10.04 Lucid Lynx

    Exclamation Re: Renaming a file via terminal

    Quote Originally Posted by The Cog View Post
    It might be easier to use quotes than backspaces for filenames with spaces, though either approach is valid:
    mv filename\ with\ spaces.svg filename\ with\ spaces.jpg
    mv 'filename with spaces.svg' 'filename with spaces.jpg'
    Tried with slashes and it didn't work.
    Tried it with quotes and it worked perfectly. Now it's all working fine.

    One thing to note was that after trying all these things, or maybe from the overall instability the problem cause, the folder /dev/null (I think) could not be found at start-up. The computer still loaded, but it did cause some concern.

    I know this is off the post's topic, but I'd love some help/re-assurance that my PC isn't gonna have a worse problem.

    Thanks for the help, John.

  5. #15
    Join Date
    Dec 2009
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Renaming a file via terminal

    Had almost the exact same problem awhile back - don't feel bad. Seems at least 3 people have done this. If I remember correctly, I had inserted a jpg, then saved the new svg file with the embedded jpg as the same name as the jpg file by mistake (slip of the mouse). Caused major freeze ups.
    http://ubuntuforums.org/showthread.php?t=1380964

  6. #16
    Join Date
    Jul 2010
    Location
    You'll never know.
    Beans
    39
    Distro
    Ubuntu 10.04 Lucid Lynx

    Lightbulb Re: Renaming a file via terminal

    Quote Originally Posted by junapp View Post
    Had almost the exact same problem awhile back - don't feel bad. Seems at least 3 people have done this. If I remember correctly, I had inserted a jpg, then saved the new svg file with the embedded jpg as the same name as the jpg file by mistake (slip of the mouse). Caused major freeze ups.
    http://ubuntuforums.org/showthread.php?t=1380964
    Did you get the error at start-up?

  7. #17
    Join Date
    Dec 2009
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Renaming a file via terminal

    I don't believe so. I'd think that would be a separate issue.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

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