Unix Tip #4494- July 1, 2014


SEARCH : Home : Help : Today's Tip

RENAMING UNPRINTABLE DIRECTORIES


This happened just the other day,
and wanted to make it available.

We discovered a directory with
no name or unprintable characters:

foohost# ls -ail
208978 drwxr-xr-x 1 2430 Aug 3 13:08
209299 drwxr-xr-x 24 3287 Oct 25 1993 .
208946 drwxr-xr-x 49 447 Jun 22 1993 ..

Using the '-i' option in ls
provided the inode of the directory.
We then were able to move the
directory to another name so we
could see what was in it using
a find command:

foohost# find . -inum 208946 -exec mv {} new.dir \;

Worked like a charm.

NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted by various unix admins around the globe. UGU suggest you read and test each tip in a non-volitile environment before placing into production.


LAST 5 TIPS
4493 - YET ANOTHER COUNTDOWN
4492 - KILL IDLE USERS
4491 - FINDING CONTROL CHARACTERS
4490 - VI AND NOT DISK SPACE
4489 - CHANGE TO LAST DIRECTORY


I want to SUBSCRIBE and get a UGU Tip everyday.
I want to UNSUBSCRIBE and NOT get a UGU Tip everyday.

If you have a UNIX TIP let us know, we just may use it:
(All tips become the property of the Unix Guru Universe)
Email Address:

Yes, email me a Hot Unix Tip everday.

Enter Hot Unix Tip (optional):

Yes, I will support this tip

Captcha (not case sensitive):


Please enter the above letters:


HOME | Flavors | Admin | Network | Security | S/W | Help | Events | Vendors | Careers | Internet
About | Add Link | Feedback | Search

Copyright © 1994-2005 Unix Guru Universe