1833447 Members
3330 Online
110052 Solutions
New Discussion

my folder have a blank

 
lj898lj
New Member

my folder have a blank

because FTP upload !
what about resolve ?
thanks
10 REPLIES 10
RAC_1
Honored Contributor

Re: my folder have a blank

backups...
nothing else will do.

What files are these?? system files, apps ??
There is no substitute to HARDWORK
Pete Randall
Outstanding Contributor

Re: my folder have a blank

Assuming you mean a blank in a name, simply use quotes to remove it:

$ touch " testfile"
$ ll |head -3
total 23568
-rw-rw-r-- 1 plr support 0 Sep 9 06:50 testfile
-rw-rw-r-- 1 root sys 3123 Jun 20 2002 Awk.html
$ rm " testfile"
$ ll | head -3
total 23568
-rw-rw-r-- 1 root sys 3123 Jun 20 2002 Awk.html
-rw-rw-r-- 1 plr support 610 Jan 27 2004 Closed
$


Pete

Pete
Yogeeraj_1
Honored Contributor

Re: my folder have a blank

hi ( ),

you can just rename it either by using a graphical tool that you may have used to the FTP or rename it at the command line:

e.g. mv "test dir" testdir

hope this helps too!
regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Robert-Jan Goossens
Honored Contributor

Re: my folder have a blank

or even if you don't know how many blanks there are inside the filename.

:/tmp/tmp# ls
rj
:/tmp/tmp# ls -i
2304 rj
:/tmp/tmp# find . -inum 2304 -xdev -exec mv {} rj \;
:/tmp/tmp# ls
rj

Regards,
Robert-Jan
twang
Honored Contributor

Re: my folder have a blank

do you try to rename it as below:
# mv "a bc" abc

Geoff Wild
Honored Contributor

Re: my folder have a blank

Just rename it with quotes around it...

mv "new folder" "somethingusefull"

How To Deal With Filenames Containing Unprintable/Special Characters:

http://www.helpdesk.umd.edu/topics/troubleshooting/os/unix/1231/

http://kb.iu.edu/data/abao.html

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A. Clay Stephenson
Acclaimed Contributor

Re: my folder have a blank

Since you are allowing PC users to connect to your box, you might as well start getting used to whitespace in your pathnames. Whitespace has always been legal in UNIX pathnames but its use has always been discouraged for the reasons you've found. Essentially all of my production scripts now assume that whitespace will be used so that quoting variables (e.g.) "${FNAME}" rather than simply ${FNAME} has become almost a personal habit. As soon as you "fix" your names this time more will appear so you might as well learn to live with what are perfectly legal pathnames.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: my folder have a blank

One more thing, real UNIX guys NEVER use the term "folder"; that concept belongs in another OS and even there the correct term is directory. After all, even in that other OS there is no "MKFOLDER" comand; let's see, they use "MKDIR".
If it ain't broke, I can fix that.
Raj D.
Honored Contributor

Re: my folder have a blank

Hi æ 建 ,

It Seems that the folder got some control character.

try to check the folder through inode , and try moving to another with valid name.

1.
# go to onesetep down of the folder.
# ls -li | grep dr [ The first column will show the inode no .]

2. Try to move the directory with another name.
# find . -inum 2222 -xdev -exec mv {} newdir \;

[ Assuming 2222 is your inode number and newdir is the name of new dirctory , that will replace the dirctory containing space.]

Cheers ,
Raj.


" If u think u can , If u think u cannot , - You are always Right . "
lj898lj
New Member

Re: my folder have a blank

thank you very much for all answer
use mv + double quotation marks is easy