- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ll shows file but not able to delete
Operating System - HP-UX
1752218
Members
11239
Online
108785
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО07-11-2007 03:31 AM
тАО07-11-2007 03:31 AM
Dear,
I am facing problem while deleting file. ll command displays the file but when I try to remove it gives error that file is non existent.
What may be reason?
Akram
I am facing problem while deleting file. ll command displays the file but when I try to remove it gives error that file is non existent.
What may be reason?
Akram
when everyting is coming your way then you are in the wrong lane
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2007 03:37 AM
тАО07-11-2007 03:37 AM
Solution
there may be a non-displayable character in the file name. You could try using find, with some known (hopefully unique) part of the filename specified, and wildcard the rest, to find and remove the file. For example, if you know the file has the string "xyz", and few or no other files have that string:
find /dir -name "*xyz*" -ok rm {} \;
This will find files in dir matching the filename and prompt you if you want to remove them or not.
find /dir -name "*xyz*" -ok rm {} \;
This will find files in dir matching the filename and prompt you if you want to remove them or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2007 03:37 AM
тАО07-11-2007 03:37 AM
Re: ll shows file but not able to delete
Hi:
No doubt, the file name contains un-printable characters.
You can handle this in various ways. To see the file, you might do:
# ls -bl /path
# rm -i /path/filename* #...and verify the removal
# ls -il /path #...and NOTE the inode number
...then using the inode number from above...
# find /path -xdev -type f -inum -exec rm -i {} \;
Remember! Inode numbers are only unique within a filesystem.
Regards!
...JRF...
No doubt, the file name contains un-printable characters.
You can handle this in various ways. To see the file, you might do:
# ls -bl /path
# rm -i /path/filename* #...and verify the removal
# ls -il /path #...and NOTE the inode number
...then using the inode number from above...
# find /path -xdev -type f -inum
Remember! Inode numbers are only unique within a filesystem.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2007 01:03 AM
тАО07-12-2007 01:03 AM
Re: ll shows file but not able to delete
Here's a nice horror story.
A guy was installing an application. The installation script asked where to install. The guy didn't give a an answer so it installed to blank....aka /.
He also put in * for the name of the directory instead of a real name. Oops.
He realized this was a mistake. He wanted to get rid of this directory.
Instead of using the inode number to delete the directory, he ran:
cd /
rm -r *
Instead of removing the * directory, the guy removed everything from the computer. The obvious lesson is: be careful when removing files with weird characters.
Is this an urban legend? Nope. It's true.
It happened in 1995. I know this because I had to fix it. It was a trivial repair on a developer's desktop hpux box.
A guy was installing an application. The installation script asked where to install. The guy didn't give a an answer so it installed to blank....aka /.
He also put in * for the name of the directory instead of a real name. Oops.
He realized this was a mistake. He wanted to get rid of this directory.
Instead of using the inode number to delete the directory, he ran:
cd /
rm -r *
Instead of removing the * directory, the guy removed everything from the computer. The obvious lesson is: be careful when removing files with weird characters.
Is this an urban legend? Nope. It's true.
It happened in 1995. I know this because I had to fix it. It was a trivial repair on a developer's desktop hpux box.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP