I am new and try to learning Terminal Command. Today I faced some problem with cp wildcard command option. I wrote in Terminal this command
cp Downloads/[:alnum:] test/
Here, Downloads
is the directory from where I want to copy alphanumeric character file to my test
directory. But When I ran this command showed me:
cannot stat ‘Downloads/[:alnum:]’: No such file or directory
I want to know, how I can use above Wildcard Classes for cp
command. And Also how I can use above Wildcard Character command.
Wildcards are
*
?
[characters]
[!characters]
[[:classes:]]
Commonly used classes are
[:alnum:]-> Match any Alphanumeric Character
[:alpha:] -> Match any Alphabetic Character
[:digit:] -> Match any nummeral
[:lower:] -> Matches any lowercase letter
[:upper:] -> Matches any Uppercase letter
How can I use those Wildcard and its Classes?