- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Unknown directory
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:09 AM
08-04-2006 07:09 AM
I have a 'ghost' directory off root.
dr-xr-xr-x 28 bin bin 8192 Apr 1 2003 var
drwxrwxrwx 2 root sys 96 Apr 25 2003
The bottom one is what I am talking about. How can I investigate what this is, it doesn't have a name. I'm sure it's nothing, but I want it off the server.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:14 AM
08-04-2006 07:14 AM
Re: Unknown directory
ls -b
to see the non-printable characters in the file/directory names.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:17 AM
08-04-2006 07:17 AM
Re: Unknown directory
\177\177\177\177
How do I get into it? I can't cd into it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:18 AM
08-04-2006 07:18 AM
Re: Unknown directory
That will list everything, include its inode number at the beginning of the line and if there are any non-printable characters in the dirctory name, it will print the octal value of those characters.
Based on that you could then do a
# find . -inum
to make sure you just get the one directory. And then to delete it:
# find . -inum
(Where
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:18 AM
08-04-2006 07:18 AM
Re: Unknown directory
should show you want character are the directory name. so you can see whats in there or delete it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:19 AM
08-04-2006 07:19 AM
Re: Unknown directory
find . -prune -inum X -exec mv {} newname \;
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:20 AM
08-04-2006 07:20 AM
Solutionls -i # this will list the inodes; find the one associated with your bogus directory
let's say it is inode 1234
next,
find . -xdev -type d -inum 1234 -exec rmdir {} \;
I would first use a safe command such as "-exec ls -l {} \;" to make sure your find filter is just right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:21 AM
08-04-2006 07:21 AM
Re: Unknown directory
It would appear that the directory beneath '/var' has a name with unprintable characters. Do:
# ls -il /var
This will give you the inode number of the directory in question as the left-most field. Now do:
# find /var -xdev -inum
...where
Too, this will require you do answer "y" to remove any files under the directory and/or the directory itself.
Regards!
...JRF...
Regards!
...JRF...
- Tags:
- unprintable chars
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:21 AM
08-04-2006 07:21 AM
Re: Unknown directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:40 AM
08-04-2006 07:40 AM
Re: Unknown directory
2305 drwxrwxrwx 2 root sys 96 Apr 25 2003 \177\177\177\177
# find . -inum 2305 |xargs ll
-rw-rw-rw- 1 p053p13 2750 1794 Dec 15 2004 ./home/tw053p13/consolid28014.lis
-r--r--r-- 1 bin bin 279 Aug 5 2002 ./opt/apache/icons/generic.sec.png
-rwxrwxrwx 1 ediuser 2750 1310 Aug 2 13:05 ./tmp/thy.D060802.T130501.log
-rw-r----- 1 avl dba 106029 Jan 5 2004 ./u06/avl/custom/payroll/data/Payroll.Hour.
D010504.T095833.dat
-rw-rw-r-- 1 edi edi 80752 Apr 5 2005 ./u34/gentran/maps/997ignr2.TBL
-r--r--r-- 1 bin bin 740 Nov 14 2000 ./usr/lib/nls/msg/ja_JP.SJIS/expreserve.cat
-r--r--r-- 1 root sys 2998 Nov 15 2000 ./var/adm/sw/products/Xserver/pfiles/INDEX
./u01/app/oracle/product/9.2.0/inventory/filemap/javavm/jahome:
total 4
-rw-r--r-- 1 oracle dba 1762 May 30 2005 files.map
./u61/oradata/disk1/stage/Queries/generalQueries/2.2.0.7.0:
total 0
drwxr-xr-x 2 root sys 96 Jun 23 2003 1
./:
total 0
Shouldn't the inode only be associated with the one directory?
Thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:44 AM
08-04-2006 07:44 AM
Re: Unknown directory
If you ran your find from the / (root) directory then you will find all occurrences of inode 2305 among ALL filesystems on your machine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:47 AM
08-04-2006 07:47 AM
Re: Unknown directory
In any case, from the last bit of output it appears that directory is empty and you can use one of the rm commands above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 07:48 AM
08-04-2006 07:48 AM
Re: Unknown directory
Using the inode number you determined to match your directory, you need to do:
# find / -xdev -inum
That is, your directory is "off root" as you say, just like '/var' is "off root".
You *must* use '-xdev' as I show(ed) since you do *not* want to cross mountpoints. Inodes are only unique within filesystems, so you must be very careful to select exactly what you want!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 08:04 AM
08-04-2006 08:04 AM
Re: Unknown directory
find / -xdev -inum 2305 -exec ls -l {}\;
find: -exec not terminated with ';'
Thank you all for your patience.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 08:06 AM
08-04-2006 08:06 AM
Re: Unknown directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2006 08:14 AM
08-04-2006 08:14 AM