Reputation: 2782
I have some files that are .py and others that are ".txt". Instead of
cp *.py myDir/
cp *.txt myDir/
is there a way to perform this in one line on the command line?
Thanks
Upvotes: 1
Views: 113
Reputation: 14531
Try this:
cp *.{py,txt} myDir/
More info about *nix wildcards you can find here.
Upvotes: 1