- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to remove a file which has starts with - (...
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
09-13-2000 06:44 AM
09-13-2000 06:44 AM
eg. filename is -t
Have tried rm "-t", rm '-t' rm -t
All give an error message, because it thinks that the dash is a opt/arg flag
Have also tried considered using rm ?t but when doing ls ?t, the wildcard expansion does not seem to be working correctly
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2000 06:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2000 06:48 AM
09-13-2000 06:48 AM
Re: How to remove a file which has starts with - (minus/dash) character
try a rm -t
this works on most "weird" characters in filenames (like * spaces tabs or control chars)
Greetz, Danny.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2000 06:48 AM
09-13-2000 06:48 AM
Re: How to remove a file which has starts with - (minus/dash) character
or use;
rm -- -t
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2000 06:49 AM
09-13-2000 06:49 AM
Re: How to remove a file which has starts with - (minus/dash) character
rm -- -t
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2000 06:50 AM
09-13-2000 06:50 AM
Re: How to remove a file which has starts with - (minus/dash) character
oookay ... the backslash i typed doesn't show up [sigh] so that was;
rm [backslash]-t
Greetz, Danny.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2000 06:50 AM
09-13-2000 06:50 AM
Re: How to remove a file which has starts with - (minus/dash) character
this question had been answered earlier in the forum... you would have to do:
rm -- -t
cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2000 06:51 AM
09-13-2000 06:51 AM
Re: How to remove a file which has starts with - (minus/dash) character
If you want to post the backslash in your reply type it twice :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2000 07:05 AM
09-13-2000 07:05 AM
Re: How to remove a file which has starts with - (minus/dash) character
careful doing ! But here it is:
cd to where the file is located and type: ls -i
This will list the files with their corresponding instance number. Now just do a find from where you are and execute the remove for that instance number
find . -inum
Just a thought,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2000 07:24 AM
09-13-2000 07:24 AM
Re: How to remove a file which has starts with - (minus/dash) character
Note that rm \-t does not work, but rm .\-t does work
(not sure why)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2000 07:29 AM
09-13-2000 07:29 AM
Re: How to remove a file which has starts with - (minus/dash) character
http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xe5810559ff7cd4118fef0090279cd0f9,00.html
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xb1800559ff7cd4118fef0090279cd0f9,00.html