简体   繁体   English

在同一目录中移动多个文件,而无需每次都输入目录名(Linux)

[英]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 我有一个包含文件a,b,c的目录dir,我想移动它们

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

is the standard way to do it. 是这样做的标准方法。 Is there a shortcut to avoid typing dir/ multiple times? 是否有避免多次输入dir /的快捷方式? 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. 您只需要使用花括号而不是括号即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将所有文件夹和文件移动到 Linux 目录中具有相同主题名称的文件夹中 - move all the folders and files to the folder with the same subject name in the directory Linux Linux Bash:将多个不同的文件移动到同一目录 - Linux Bash: Move multiple different files into same directory 根据目录名称移动文件(Linux / Debian /#!) - Move files based on directory name (Linux / Debian / #!) 在Linux中相应目录内的文件中添加每个目录的名称 - Add name of each directory to files inside the corresponding directory in linux Shell:如何将多个文件移动到一个目录并以不同的名称压缩该目录? - Shell: How to move multiple files to a directory and zip that directory with different name? 如何根据 linux 中的名称将文件移动到新目录? - How do I move files to a new directory based on their name in linux? 在linux中,将多个目录中的同名文件复制到一个以路径不同为名称的新目录中 - In linux, copy files with the same name in multiple directories, to a new directory with the path difference as name Unix 在一个目录下创建多个同名文件 - Unix create multiple files with same name in a directory 移动目录而不知道名称 - Move directory without knowing name Linux命令在目录中查找具有相同名称但扩展名不同的所有文件? - Linux command to find all the files with same name but different extension in a directory?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM