The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" iBot UNIX and Linux RSS News 0 01-04-2008 03:00 PM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-20-2007 01:52 AM
Listing only directories in the current working directory using the "ls" command igandu UNIX for Dummies Questions & Answers 2 05-12-2006 05:47 AM
No utpmx entry: you must exec "login" from lowest level "shell" peterpan UNIX for Dummies Questions & Answers 0 01-18-2006 04:15 AM
Restoring back files from "lost+found" directory dhasarath Filesystems, Disks and Memory 1 09-24-2002 10:40 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-10-2008
barkath barkath is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 12
cannot cd or rename the directory "{};"

I'm kind of lost here, I see a dir. "{};" while listing files and dir. (FYI.... I enclosed the dir. {}; in double quotes), not sure how this dir. got created in first place.

# ls -lt | more
total 279320
-rwxrwx--- 1 root system 105 Jan 10 12:13 test.sh
drwxr-xr-x 2 root system 16384 Jan 10 09:33 {};

I cannot cd or even rename that dir. either:

# cd {};
_cd[3]: {}: not found.

# mvdir {}; testdir
Usage: mvdir Directory1 Directory2
ksh: testdir: not found.

When I do find, it lists the files in dir. "{};" but cannot access those files either.

# find . type f -print | xargs ls -ld | more
drwxr-xr-x 2 root system 16384 Jan 10 09:33 ./{};
-rwxrwx--- 1 root system 513131 Dec 01 2003 ./{};/U5120.321
-rwxrwx--- 1 root system 17270 Jul 22 2005 ./{};/U7393.214
-rwxrwx--- 1 root system 461448 Jan 02 2004 ./{};/UUU201.001
-rwxrwx--- 1 root system 463115 Jan 03 2005 ./{};/UUU301.001
-rwxrwx--- 1 root system 460986 Jan 04 2005 ./{};/UUU401.001
-rwxrwx--- 1 root system 534650 Jan 05 2004 ./{};/UUU501.001
-rwxrwx--- 1 root system 493359 Jan 05 2005 ./{};/UUU501.002
-rwxrwx--- 1 root system 305464 Jan 06 2004 ./{};/UUU601.001
-rwxrwx--- 1 root system 490023 Jan 06 2005 ./{};/UUU601.002
-rwxrwx--- 1 root system 135410 Jan 07 2004 ./{};/UUU701.001
-rwxrwx--- 1 root system 640995 Jan 07 2005 ./{};/UUU701.002

Any help would be very much appreciated.

Thanks
  #2 (permalink)  
Old 01-10-2008
frank_rizzo frank_rizzo is offline Forum Advisor  
Resident BOFH
  
 

Join Date: Dec 2007
Posts: 426

Code:
mv '{};' blah

or


Code:
ls -li

then take the inode number


Code:
find . -inum inode_number -exec mv {} blah \;

  #3 (permalink)  
Old 01-11-2008
barkath barkath is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 12
cannot cd or rename the directory "{};"

Thanks frank_rizzo it worked.
  #4 (permalink)  
Old 01-17-2008
adderek adderek is offline
Registered User
  
 

Join Date: Sep 2007
Location: Poland
Posts: 111
You could always use ls -b
For example:
mkdir '/tmp/some
silly and stupid directory with $HOME and \\ and # and {};'
ls -b /tmp
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0