Results 1 to 5 of 5

Thread: accessing files with spaces in the name

  1. #1
    Join Date
    Dec 2007
    Location
    austin, tx
    Beans
    2,273
    Distro
    Ubuntu 16.04 Xenial Xerus

    Lightbulb accessing files with spaces in the name

    output
    ray@ray-GC660AA-ABA-SR5123WM:~$ cd /home/ray/Documents/house
    ray@ray-GC660AA-ABA-SR5123WM:~/Documents/house$ ls -l
    total 32
    -rw-rw-r-- 1 ray ray 17893 Feb 20 11:20 for house.odt
    -rw-rw-r-- 1 ray ray 11407 Jan 6 07:14 house equilty.odt
    okay then i run this to open the the first with libreoffice
    ray@ray-GC660AA-ABA-SR5123WM:~/Documents/house$ libreoffice "for house.odt" this works fine. file is displayed with libre .
    note that both .odt files have a space in their name. what wild card would i use not to have to type out the whole path
    eg. if i replace "for house.odt" with "for*.odt" i get the error message that file doesnt exist. doing something stupid

    tks

  2. #2
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: accessing files with spaces in the name

    You can use 'TAB completion' and type TAB (the tabulator key often above Caps Lock)
    Code:
    libreoffice forTAB
    and bash will fill it to
    Code:
     libreoffice for\ house.odt
    So another way to manage spaces or other special characters in bash is the backslash character '\' in front of each special character, and this is done automatically by 'tab completion'
    Last edited by sudodus; March 18th, 2013 at 06:00 PM.

  3. #3
    Join Date
    Dec 2007
    Location
    austin, tx
    Beans
    2,273
    Distro
    Ubuntu 16.04 Xenial Xerus

    Lightbulb Re: accessing files with spaces in the name

    sud tks but i first had to find out how to install tab complete in xubuntu as it is not installed by default. found this

    August 1st, 2011 #13 edwinorc
    First Cup of Ubuntu

    Join Date
    Aug 2011
    Beans
    5
    Re: Installed xfce, now no Tab-complete in Terminal apps?
    I accidentally discovered a fix for this while trying to solve a different problem.

    edit
    ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml

    find the line

    <property name="&lt;Super&gt;Tab" type="string" value="switch_window_key"/>

    and change it to

    <property name="&lt;Super&gt;Tab" type="empty"/>

    reboot or whatever and then tab will work properly!



    again after i did the above it works like a charm

  4. #4
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: accessing files with spaces in the name

    I'm glad you fixed it but no tab-completion in Xubuntu? Which version are you running?

    Edit: I just tried in Xubuntu 12.04.2 LTS, and it works in the default terminal window, 'Xfce Terminal Emulator'. But it does not work in the alt + F2 'Run Program' window. Was that what you meant?
    Last edited by sudodus; March 19th, 2013 at 07:16 PM.

  5. #5
    Join Date
    Dec 2007
    Location
    austin, tx
    Beans
    2,273
    Distro
    Ubuntu 16.04 Xenial Xerus

    Lightbulb Re: accessing files with spaces in the name

    yup

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
  •