Results 1 to 9 of 9

Thread: using terminal to open .jpg with spaces in name

  1. #1
    Join Date
    Dec 2007
    Location
    green bay, wi
    Beans
    2,239
    Distro
    Ubuntu 16.04 Xenial Xerus

    Lightbulb using terminal to open .jpg with spaces in name

    okay what am i doing wrong trying to open with last .jpg with gpciview . first i used tab competition and got the following results
    THIS IS A LINUX COMPUTER HAVE FUN
    HAVE A GREAT DAY
    ray@ray-GC660AA-ABA-SR5123WM:~$ gpicview / T
    ray@ray-GC660AA-ABA-SR5123WM:~$ gpicview / T
    Templates/
    thanksgiving wallpapers/
    timezone
    toon175y25 (1).jpg
    top-ten-3d-wallpapers-1.jpg
    Tux Happy Holidays Wallpapers Christmas Penguin in the Snow.jpg
    ray@ray-GC660AA-ABA-SR5123WM:~$ gpicview / T

    then lost can use qpicview "Tux etc" wont work. tks

  2. #2
    Join Date
    Mar 2011
    Location
    UK
    Beans
    125
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: using terminal to open .jpg with spaces in name


    Hi there

    Remember linux is Case sensetivve with a capital "C" try using a lower case t with tab completion. You can get around spaces in a filename by adding a \ before them or quoting the whole string eg.

    filename-with-a\ space-in-it.jpg

    "filename-with-a space-in-it.jpg"

    Hope this helps!!

    Barry

    Edit: sorry i didn't see that last jpg. Capital T is indeed correct. Try this:

    Code:
    gpicview ~/Tux\ Happy\ Holidays\ Wallpapers\ Christmas\ Penguin\ in\ the\ Snow.jpg
    Last edited by PowerBarry43; May 7th, 2013 at 01:49 PM.
    Desktop: Z77X-UD5H, Intel i7 3770k, NVidia GeForce 660 Ti Sli 16GB DDR3 RAM 2TB HDD
    OSes: Mint 14 x64 Windows 7 Ultimate x64
    Laptop: Dell Latitude E6430
    OSes: Ubuntu 13.04 x64, Backtrack 5 R3

  3. #3
    Join Date
    Dec 2007
    Location
    green bay, wi
    Beans
    2,239
    Distro
    Ubuntu 16.04 Xenial Xerus

    Lightbulb Re: using terminal to open .jpg with spaces in name

    power tks but is there a easier way by using a wild card like * to cut down on the typing? i know there is but i just cant recall.

  4. #4
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: using terminal to open .jpg with spaces in name

    You can also drag and drop files to the terminal to fill in their file path. That saves you having to type such a long filename! It also ensures that the spaces in the filename are escaped out (Tux\ Happy\ Holidays etc) or that the filename is fully quoted ("Tux Happy Holidays" etc).
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  5. #5
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: using terminal to open .jpg with spaces in name

    Quote Originally Posted by rburkartjo View Post
    power tks but is there a easier way by using a wild card like * to cut down on the typing? i know there is but i just cant recall.
    I just posted an easy way to cut down on the typing, but yes you can use wildcards. Especially handy when opening more than one file.

    Code:
    gpicview Tux*
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  6. #6
    Join Date
    Dec 2007
    Location
    green bay, wi
    Beans
    2,239
    Distro
    Ubuntu 16.04 Xenial Xerus

    Lightbulb Re: using terminal to open .jpg with spaces in name

    3rd that was what i was looking for tks

  7. #7
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    4,583
    Distro
    Xubuntu 13.04 Raring Ringtail

    Re: using terminal to open .jpg with spaces in name

    you can use quotes also
    gthumb "/home/$USER/Pictures/My Picture.jpg"
    gthumb /home/$USER/Pictures/"My Picture.jpg"
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

  8. #8
    Join Date
    Dec 2007
    Location
    green bay, wi
    Beans
    2,239
    Distro
    Ubuntu 16.04 Xenial Xerus

    Lightbulb Re: using terminal to open .jpg with spaces in name

    and also tks pq

  9. #9
    Join Date
    Mar 2011
    Location
    UK
    Beans
    125
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: using terminal to open .jpg with spaces in name

    in this situation I think the easiest way would be to type
    gpicview ~/T
    then hit TAB

    Hope this helps!
    Barry
    Desktop: Z77X-UD5H, Intel i7 3770k, NVidia GeForce 660 Ti Sli 16GB DDR3 RAM 2TB HDD
    OSes: Mint 14 x64 Windows 7 Ultimate x64
    Laptop: Dell Latitude E6430
    OSes: Ubuntu 13.04 x64, Backtrack 5 R3

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
  •