GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: File name with "-" as 1st character
Operating System - HP-UX
1848253
Members
8891
Online
104022
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
Forums
Discussions
Discussions
Forums
Discussions
back
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
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
10-29-2004 06:57 AM
10-29-2004 06:57 AM
File name with "-" as 1st character
How do I remove a file which has a "-" as the first character????? The system thinks the "-" is part of the command
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2004 07:00 AM
10-29-2004 07:00 AM
Re: File name with "-" as 1st character
Hi,
One way to do it is like this:
rm -- -filename
The -- tells the rm command that no more command line options are coming so that it will know that any other dashes are part of the filenames.
JP
One way to do it is like this:
rm -- -filename
The -- tells the rm command that no more command line options are coming so that it will know that any other dashes are part of the filenames.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2004 07:00 AM
10-29-2004 07:00 AM
Re: File name with "-" as 1st character
rm --
This shall take your worry away
Thanks
prashant
This shall take your worry away
Thanks
prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2004 07:30 AM
10-29-2004 07:30 AM
Re: File name with "-" as 1st character
Check out htis page:
http://unix.t-a-y-l-o-r.com/UMstrange.html
Files that begin with a dash can be removed by typing
rm ./-filename
Rgds....Geoff
http://unix.t-a-y-l-o-r.com/UMstrange.html
Files that begin with a dash can be removed by typing
rm ./-filename
Rgds....Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
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.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP