From bc072e6b63339bbcb0ad323c5fbced825fad8417 Mon Sep 17 00:00:00 2001 From: Mayank Kamboj Date: Mon, 11 Mar 2019 19:46:06 +0530 Subject: [PATCH] Added way to copy a given type of files (#30157) --- guide/english/bash/bash-cp/index.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/guide/english/bash/bash-cp/index.md b/guide/english/bash/bash-cp/index.md index 7a96e140ea..9af035fcc2 100644 --- a/guide/english/bash/bash-cp/index.md +++ b/guide/english/bash/bash-cp/index.md @@ -27,6 +27,11 @@ cp -p somefile.txt your/target/directory cp file1.txt file2.txt fileN.txt your/target/directory ``` `cd` into the target directory, `ls`, and you will see copies of all of the files. + ### Copy an entire set of files with given extension + ```bash + cp *.extension directory + ``` + `cd` into the target directory and you will see all files with entered extension into the directory #### Copy a directory ```bash cp -R directory/to/copy your/target/directory @@ -34,4 +39,4 @@ cp -R directory/to/copy your/target/directory `cd` into the target directory and `ls` to see your directory. The `-R` option is added to recursively copy everything in the directory. ### More Information * run `man cp` to get a list of all options for this command -* [Wikipedia](https://en.wikipedia.org/wiki/Cp_(Unix)) \ No newline at end of file +* [Wikipedia](https://en.wikipedia.org/wiki/Cp_(Unix))