- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- trouble removing a weird file name
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
01-10-2003 12:42 PM
01-10-2003 12:42 PM
trouble removing a weird file name
Someone put a file name like this on our system and I can't remove it, tried rm -i * and it quits when it hits this one.
Here the example, it starts with a - sign.
example -Ptest_test.txt
Any ideas,
Thanks
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 12:46 PM
01-10-2003 12:46 PM
Re: trouble removing a weird file name
rm -- -Ptest_test.txt
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 12:47 PM
01-10-2003 12:47 PM
Re: trouble removing a weird file name
rm ./-Ptest_test.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 12:48 PM
01-10-2003 12:48 PM
Re: trouble removing a weird file name
We need to tell the rm command that there are no more options to process via the '--' argument.
rm -- -Ptest_test.txt
should do the trick.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 12:51 PM
01-10-2003 12:51 PM
Re: trouble removing a weird file name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2003 12:52 PM
01-10-2003 12:52 PM
Re: trouble removing a weird file name
# rm -- -Ptest_test.txt
...Note the double hyphen. This tells well-behaved Unix commands that there are no more flags (options).
# touch -- -me
# rm -i -- -me
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2003 12:44 AM
01-13-2003 12:44 AM
Re: trouble removing a weird file name
but just to add my penny worth...
Use "ls -ali" to find the file's inode and then
"find . -inum
Garry F
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2003 12:59 AM
01-13-2003 12:59 AM
Re: trouble removing a weird file name
then
find . -imum inode_no -exec rm {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2003 01:17 AM
01-13-2003 01:17 AM
Re: trouble removing a weird file name
check the man pages of rm.
Also you can use
rm ./<-filename>