- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cannot delete a file
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
06-16-2005 04:38 AM
06-16-2005 04:38 AM
Cannot delete a file
frank:[/users/student2/0006/deleted] # ls -b
.addressb\033on\215lu .pine-de'Mg3
but no rm .a* or any rm .* will catch it:
frank:[/users/lu non-existenteleted] # rm .a*
You see how it wrote over the current line with the lu? Any ideas? I even tried deleting the inode, and that won't work either:
frank:[/users/student2/0006/deleted] # find . -inum 49196 -exec rm {} \;
It is still there afterwards, with no errors or messages. I would really like to clean this up, it is bugging me!
Thanks for any ideas,
c*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 04:44 AM
06-16-2005 04:44 AM
Re: Cannot delete a file
Try rm -i * and answer yes only on the file you want to remove.
Enjoy :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 04:46 AM
06-16-2005 04:46 AM
Re: Cannot delete a file
Hope this is of some help
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 05:17 AM
06-16-2005 05:17 AM
Re: Cannot delete a file
cd /users/student2/0006/deleted
mkdir /tmp/tempstorage
cp -Rp * /tmp/tempstorage
cd ..
rm -r /users/student2/0006/deleted
mkdir /users/student2/0006/deleted
(modify ownership and permissions properly here)
mv /tmp/tempstorage/* /users/student2/0006/deleted
with the same regex matching logic, files with offending characters will not match * and will not be copied to /tmp/tempstorage, hence when you remove the whole directory, they will be gone. After that you will restore the salvaged files back to the original location.
I am not sure why a* is not matching this file, but obviously, one or more of these offending characters do something like cursor location manipulation, causing you this much headache.
Hope this helps..
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 06:37 AM
06-16-2005 06:37 AM
Re: Cannot delete a file
One more trick that I use is
rm .a
Where
Hit the escape key twice and that will auto complete the command and will automatically find the name with hidden/non ascii characters and complete the word.
tanks
Devesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 06:42 AM
06-16-2005 06:42 AM
Re: Cannot delete a file
I tried deleting the file using its inode number and it worked fine. Here's what I did on my system:
1. ls -i ".addressb\033on\215lu .pine-de'Mg3"
2. find . -inum
3. repeat step 1 to verify it got deleted
cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 08:13 AM
06-16-2005 08:13 AM
Re: Cannot delete a file
I will try sam, and also emacs (which allows a directory listing inside)--I wish I had thought of that before.
c*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 08:23 AM
06-16-2005 08:23 AM
Re: Cannot delete a file
c*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 08:42 AM
06-16-2005 08:42 AM
Re: Cannot delete a file
Try-
rm .a* >/tmp/msg 2>&1
strings /tmp/msg
And see if any message you can't see on the screen is being displayed...
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 08:51 AM
06-16-2005 08:51 AM
Re: Cannot delete a file
frank:[/users/student2/0006/deleted] # rm .a* > /tmp/msg 2>&1
frank:[/users/student2/0006/deleted] # more /tmp/msg
rm: .addressb^[onM-^Mlu non-existent
which is what I get on the command line (but it is hard to tell since it is written over).
c*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 09:30 AM
06-16-2005 09:30 AM
Re: Cannot delete a file
set your term to "unknown" rather than hp or vt100 or whatever else. then try doing cat on /tmp/msg to see what characters are there.
then try constructing the file name using the esc sequences from the command line of your "unknown" terminal using ctrl-V then the ctrl-character sequences and delete it.
Again this is just a wild suggestion and it still at the end, your regex matching should not be dependent on what type of terminal you are using when you run an rm .a* command.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 09:31 AM
06-16-2005 09:31 AM
Re: Cannot delete a file
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 09:50 AM
06-16-2005 09:50 AM
Re: Cannot delete a file
ls -1 | od -c
With that you'll get a better idea of what you're dealing with.
But, the Mel's posting where everything else gets moved out, and then your whole directory gets removed should work for you.
Another trick...
rm -i ./* ./.*
or...
cd ..
rm -i ./deleted/* ./deleted/.*
Then answer yes for the file you want gone.
This is similiar to one of the previous posting, except that you're prefixing a directory in there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 10:04 AM
06-16-2005 10:04 AM
Re: Cannot delete a file
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 01:45 PM
06-16-2005 01:45 PM
Re: Cannot delete a file
Try this
#mv ".address
#rm 1234
Hope this works.
Cheers!!!
eknath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 07:45 PM
06-16-2005 07:45 PM
Re: Cannot delete a file
ls -1 | xd -tx1 -tc
in order to get the characters of that filename.
Please, run that command line and post its output here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 07:51 PM
06-16-2005 07:51 PM
Re: Cannot delete a file
cd /users/student2/0006/
mkdir deleted_new
cp -ri deleted/* deleted_new
Press n for that specific file and move this new as old one.
rm -f ./.address*
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2005 12:51 AM
06-17-2005 12:51 AM
Re: Cannot delete a file
frank:[/] # strings /tmp/msg
rm: .addressb
lu non-existent
frank:[/] # cd /users/student2/0006/deleted
frank:[/userlu not found006/deleted] # ll
./.pine-de'Mg3 not found
total 0
frank:[/userlu not found006/deleted] # ls -l | od -c
./.pine-de'Mg3 not found
0000000 t o t a l 0 \n
0000010
frank:[/userlu not found006/deleted] # ls -l | xd -tx1 -tc
./.pine-de'Mg3 not found
0000000 74 6f 74 61 6c 20 30 a
t o t a l 0 \n
0000008
There are answers to all the requests for posts, still nothing works. There is only that one file in the directory, and rm -r of the directory won't work, so moving everything else out is moot. Do these outputs give anyone ideas?
c*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2005 01:29 AM
06-17-2005 01:29 AM
Re: Cannot delete a file
Regards,
Fred
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2005 02:19 AM
06-17-2005 02:19 AM
Re: Cannot delete a file
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2005 02:32 AM
06-17-2005 02:32 AM
Re: Cannot delete a file
I'm working on the programming end of it (perl).
c*