LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux can't read windows'File's name with space in it (https://www.linuxquestions.org/questions/linux-newbie-8/linux-cant-read-windowsfiles-name-with-space-in-it-467752/)

xpucto 07-26-2006 04:04 AM

Linux can't read windows'File's name with space in it
 
Hi!
I have to burn so windows files but those files are in folders with names which contain blanks. It seems that linux can't recognize them. if I do ls -l, I get:
Quote:

dr-x------ 4 root root 4096 Mar 31 16:46 ArcPad StreetMap GDT Datasets
dr-x------ 23 root root 4096 Jan 30 12:16 Paket 1 - ArcGIS 9
dr-x------ 9 root root 4096 Jan 30 12:20 Paket 2 - ArcGIS Server
dr-x------ 13 root root 4096 Jun 20 11:09 RECYCLER
dr-x------ 21 root root 4096 Jun 20 12:07 System Volume Information
But when I copy the name, I get:
Quote:

sudo ls -l /media/disk/ZID/Paket 1 - ArcGIS
ls: /media/disk/ZID/Paket: No such file or directory
ls: 1: No such file or directory
ls: -: No such file or directory
ls: ArcGIS: No such file or directory
ls: 9: No such file or directory
What can I do? The files don't belong to me, so I don't rename them (I wouldn't be abble to anyway!).
Thanks.

Nylex 07-26-2006 04:07 AM

Either put the file/directory name between double quotes, or use a slash, e.g.

$ ls /path/to/"Some directory with spaces"

$ ls /path/to/Some\ Directory\ with\ spaces

If the file or directory name is unique, you can use tab completion to do this automatically (type the first few characters and then press the Tab key).

xpucto 07-26-2006 04:11 AM

Thanks! the problem is that I always use sudo and tab key doesn't work where root rights are needed. I've now switched on su, and tab key works. Thanks again for the quick answer.

jstephens84 07-26-2006 10:22 AM

Another way of doing it is just to place double qoutes aroung the whole file name IE

cd "/usr/path files/somedir"


All times are GMT -5. The time now is 08:20 PM.