- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem remove file with special character
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
04-14-2003 12:25 AM
04-14-2003 12:25 AM
We had accidently created a file with "-" character in front of a file name.
Eg) A file name called "-B", we couldn't find a way to delete this file. Even when we tried to use the following methods, but none of them works:
# rm "-B"
# rm "\-B"
Could anyone suggest the method to overcome the above problem? Thank you in advance.
Regards,
Melvin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2003 12:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2003 12:29 AM
04-14-2003 12:29 AM
Re: Problem remove file with special character
One way I've got rid of files with special characters in the past is to first of all make sure I had a good backup then done rm -i * and answered yes to the file I want to get rid of, no to others.
There is probably a "safer" way of doing it.
Regards,
Hilary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2003 12:29 AM
04-14-2003 12:29 AM
Re: Problem remove file with special character
Run this -
$ rm -- -B
-- signifies end of options.
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2003 12:29 AM
04-14-2003 12:29 AM
Re: Problem remove file with special character
In these case I use the CDE-filemanager, and remove it with the mouse. Easy and simple.
Greetzz
Donald
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2003 12:30 AM
04-14-2003 12:30 AM
Re: Problem remove file with special character
This will give you the inum, for instance inum 980.
Then
find . -inum 980 -exec rm -i {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2003 12:36 AM
04-14-2003 12:36 AM
Re: Problem remove file with special character
# rm ./-B
should also work
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2003 04:37 AM
04-15-2003 04:37 AM
Re: Problem remove file with special character
rm *B*
TJS