How do I remove or access a file with the name '-something' or containing another strange character ?
If your file starts with a minus, use the -- flag to rm; if your file is named -g, then your rm command would look like rm -- -g. As well, and especially if you have an unprintable character (output from ls looks like ?ile) you might try something like rm -i ./*ile which will also work for commands other than rm (grep for instance).
Tags:
- About
- Research
- Faculty
- Awards & Honors
- Undergraduate
- Graduate
- Careers
- Outreach
- Alumni
- UTCS Direct
Facilities
- Audio & Visual
- Change SMTP/Outgoing Mail Password
- Cluster Node Status
- Documentation
- FAQ
- Help
- Lab Software Request Form
- Laptop Encryption
- List of Public UNIX Hosts
- Meeting Rooms
- Public Labs
- Shop Req (Hardware Issues/Requests)
- Software Downloads
- Status
- System Status Blog
- Tech Staff Updates Blog
- UTCS IT Policies