简体   繁体   中英

Move multiple files in same directory without typing directory name each time (Linux)

I have a directory dir with files a, b, c, and I want to move them

mv dir/a dir/b dir/c ...

is the standard way to do it. Is there a shortcut to avoid typing dir/ multiple times? Perhaps like so:

mv dir/(a, b, c) ...

是的,它与您的猜测非常相似: mv dir/{a,b,c} dest

Yes, you should be able to do the following

mv dir/{a.out, b.out, c.out} /path/to/newdirectory/

You just need to use curly braces instead of parenthesis.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM