May
28
2010
How To mv Files With A Dash: mv: invalid option — 1, Try mv –help for more information
Posted by alex in ErrorsRecently I was moving files from one directory to another on a CentOS 5.4 server and ran into an issue. When attempting to move every single file in the directory I received an error which is noted below. It took me a couple minutes but I figured out by trial and error that the issue was related to files starting with a “-”(dash) because the mv command thought that I was attempting to use a switch. The resolution is easy using “./”. Look at the below examples for more information about the error and how it was resolved.
Tags: -, ./, CentOS, CLI, cp, dash, directory, dot slash, error, help, invalid option, Linux, move, mv








Entries (RSS)