• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Ubuntu Linux issue: Invalid option "-0"

I have a box at work running Ubuntu 10.04 and I have come across a very strange issue. I need to convert a large amount of raw format photos and I typically use:

dcraw -D *.CR2

I use this wildcard to convert the multitude of files in the canon raw format .CR2.
The issue is that only in the folder that the photos are located this command yields the error:

Invalid option "-0"

I have tested dcraw with the same parameters in a different folder and it works fine and other commands such as the build in mv command yield the same error when using a wildcard.

Why is this occurring?? Is it a permissions error?

I have copied the files to other folders to no avail.
 
Never mind I found the issue:

My coworker named some of the files with a minus character in front of the name " - "

So when the system walked through the files in the folder it saw the file name as an option:

-[myfilename]

Looks like I've got some renaming to do...
 
First thought that springs to mind is to check the filenames... see if any have a " -0" in their name (note the space). If so, it could be treating those as part filename, part option

NVM: You found the issue at the same time as my post 😛
 
Last edited:
A lot of commands will accept -- to mean anything after this is an option regardless of it's contents, so that might help. But naming things like that is bad anyway so you should probably rename them eventually.
 
Out of habit I always only use lowercase letters and underscores for naming files and directories, but it's a whole different ballgame when someone else names the files you need to use...
I'll have to go over some naming guidelines, because when you deal with so many files, it's not easy to catch mistakes.
 
Back
Top