- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cannot delete non-existent link
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
Discussions
Discussions
Forums
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
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
тАО04-27-2004 10:01 AM
тАО04-27-2004 10:01 AM
I have this kinda odd situation. Under one of the directories, I have:
lrwxrwxrwx 1 xcalibur xcalibur 33 Apr 19 10:32 logs ->
/p105/logs/xcalibur/pro/warehouse
So logs is just a sym. link. I'm trying to erase the syslink:
#rm logs
#
No error messages, nothing. But then if I do an 'ls' in that directory again, I still can see the logs link.
'cd' to logs also fails:
# cd logs
ksh: logs: not found
#
Help
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2004 10:13 AM
тАО04-27-2004 10:13 AM
SolutionDo an ls -b. That will displays the unprintable characters in octal notation.
You should then be able to do something like rm -i lo* or rm -i *lo* dependingd upon where the bogus characters are located. THe -i asks you to confirm with 'y' before removing each file. Man ls, rm for details.
- Tags:
- unprintable chars
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2004 10:46 AM
тАО04-27-2004 10:46 AM
Re: cannot delete non-existent link
You could try renaming the upper directory, then try removing "log".
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2004 05:30 PM
тАО04-27-2004 05:30 PM
Re: cannot delete non-existent link
rm -i *log* and then delete this / It can be a FS corruption as well. Try unmount and fsck
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2004 05:57 AM
тАО04-29-2004 05:57 AM
Re: cannot delete non-existent link
Here's a MUCH simpler way to remove the link and can be used the same with files ...
1) Obtain the inode number of the link/file
ls -li (note, in this case it's logs)
You would be returned something like this:
123 lrwxrwxrwx 1 xcalibur xcalibur 33 Apr 19 10:32 logs ->
/p105/logs/xcalibur/pro/warehouse
2) Perfrom a find by the inode number and remove the link/file
find / -inum 123 -exec rm {} \;
That's it! Very simple, VERY easy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2004 10:35 AM
тАО04-29-2004 10:35 AM
Re: cannot delete non-existent link
You seem to be making an assumption that all inums are unique. They are not. The same inum value can appear in multiple file systems. Your example of "find / -inum 123"
could have the potential of eliminating files not meant to be deleted...
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2004 03:53 PM
тАО04-29-2004 03:53 PM
Re: cannot delete non-existent link
Each filesystem has its own set of inodes, and there can be duplicate inode numbers between filesystems. Thus, if you were to substitute my 2nd step in my previous note with the step below, you can ensure the correct file that is assigned the inode number in my 1st step in my previous note gets removed:
2) Perfrom a find by the inode number, on the filesystem that the link/file exists on, and remove the link/file
find /tmp -inum 123 -exec rm {} \;
This step 2 is assuming the /tmp filesystem is the filesystem where the logs link exists.
For background info on inodes, they are allocated randomly, with no attempt to group related inodes such as those of files in the same directory. There is one inode for each file and each inode can be identified by its inode number, which equals its index in the inode list.
Thanks Rodney for catching this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2004 09:41 AM
тАО05-12-2004 09:41 AM
Re: cannot delete non-existent link
ls -i
find / -inum 205 -size 675c -exec rm {} \;