1

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

0

1 Answer 1

1

Try this:

cp *.{py,txt} myDir/

More info about *nix wildcards you can find here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.