LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices

Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Old

Dealing with file names (oddly) starting with an hyphen

Posted 11-19-2013 at 02:58 PM by the dsc (linux-related notes)

In a script or routine usage, you may stumble for some reason with a file starting with "-".

"ls *.lol" command in that dir will return error if the next character doesn't happen to be an option of "ls", and/or if it is an option, but the next part isn't coincidentally an "argument", which is probably unlikely.

The same applies for commands such as mv and rm.

but to deal with it you can issue something like
...
Member
Posted in Uncategorized
Views 1021 Comments 2 the dsc is offline

  



All times are GMT -5. The time now is 04:29 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration