Linux file operations _ daily record

1. File movement

(1) Move all files under the folder to another folder: 

Move all files under a folder to another folder: 
1. When the dir2 file directory does not exist, cp -r dir1 dir2 (not personally tested)
2. When the dir2 file directory exists, cp -r dir1/.dir2 ( Pro test available)
Example: move the files in the xx folder to the zz folder

cp -r /home/xx/. /home/zz




-------------------------------------- Recording stickers------------ ---------------------------------------

2018-1-2 increase

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325734491&siteId=291194637