1

I have several CSV files in my downloads folder that I'd like to move to another directory to work with. Let's call them (1) test.csv; (2) bob.csv; and (3) foobar.csv; . If these were the only files in the current directory I know I could move them using mv *.csv /file/path/.

However, in some cases there might be hundreds of other CSV files in the downloads folder and I'd just like to move the most recent ones (viewed using ls -alt | head -10 for example).

Is there a way I can do something like

mv ["test.csv", "bob.csv", "foobar.csv"] /file/path ?

2

Yes, just remove the brackets and commas and you are done.

mv "test.csv" "bob.csv" "foobar.csv" /file/path

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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