Inside of my Linux directory, I have a file named TopSample$Config.class
.
Whenever I try to copy this file to another location/directory, it is not allowing m
Or replace the offending character with the filename metacharacter of '?', meaning "any one character". Note that while this might be more convenient and requires the fewest keystrokes, be aware that a filename of TopSample?Config.class
will also match TopSampleaConfig.class
, TopSamplebConfig.class
, TopSamplecConfig.class
, etc.
The shell will interpret $Config
as a variable. And it will expand to empty string.
You can put single quotes around to keep the literal value:
cp 'TopSample$Config.class' /home/praveen/com/config/
Another way is to escape the $
(dollar sign) by using \
(backslash)
cp TopSample\$Config.class /home/praveen/com/config/
Put single quotes around the filename.
cp 'TopSample$Config.class' /home/praveen/com/config