Added way to copy a given type of files (#30157)

This commit is contained in:
Mayank Kamboj
2019-03-11 19:46:06 +05:30
committed by Randell Dawson
parent 50a9ecf64e
commit bc072e6b63

View File

@ -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))
* [Wikipedia](https://en.wikipedia.org/wiki/Cp_(Unix))