mirror of
https://github.com/you-dont-need/You-Dont-Need-GUI.git
synced 2025-08-11 07:44:15 +02:00
Use -a
when copying a directory to copy mtimes
When copying an entire directory, it's useful to maintain the individual modification times of the files and directories within. The argument `-a` maintains modification times, permissions, and enables recursive copying, whereas `-R` only copies recursively.
This commit is contained in:
@@ -58,7 +58,7 @@ cp readme.txt readme.bak.txt
|
|||||||
Copy `myMusic` folder under `myMedia` folder
|
Copy `myMusic` folder under `myMedia` folder
|
||||||
|
|
||||||
```
|
```
|
||||||
cp -R myMusic myMedia
|
cp -a myMusic myMedia
|
||||||
```
|
```
|
||||||
|
|
||||||
## <a id="duplicatefolder"></a>duplicate a folder
|
## <a id="duplicatefolder"></a>duplicate a folder
|
||||||
@@ -68,7 +68,7 @@ cp -R myMusic myMedia
|
|||||||
If `myMedia` folder doesn't exist
|
If `myMedia` folder doesn't exist
|
||||||
|
|
||||||
```
|
```
|
||||||
cp -R myMusic myMedia
|
cp -a myMusic myMedia
|
||||||
```
|
```
|
||||||
|
|
||||||
## <a id="movefile"></a>move a file
|
## <a id="movefile"></a>move a file
|
||||||
|
Reference in New Issue
Block a user