1. cp命令 復制copy命令的簡寫
SYNOPSIS
?????? cp [OPTION]... [-T] SOURCE DEST
?????? cp [OPTION]... SOURCE... DIRECTORY
?????? cp [OPTION]... -t DIRECTORY SOURCE...
cp? SOURCE? DEST?? 后者如果是目錄那么源文件就復制到文件夾里面并且保持著原來的名字;如果DEST是文件名那么復制過來的文件的名字就修改成此文件名
cp source…..directory??? 同時復制多個源那么目標只能是目錄
cp –t directory source …….? 使用-t選項可以將目標和源的位置顛倒位置
?
參數? -f?? force? 如果文件名存在那就刪除文件然后復制,復制的時候也不提示覆蓋
??????? -r?? recursive?? 遞歸復制 linux的復制命令默認是不能復制目錄的,所以必須使用此參數進行目錄的復制
??????? -i?? 交互式提醒?
?????? -p?? 復制鏈接文件的原文件?
?????? -L? derefrence??? 只復制原文件
?????? -P 大寫?? 復制鏈接文件還是鏈接,保持原有屬性
????? -a?? archive?? 歸檔復制? 保持文檔的一切屬性不變
?
2.mv? 移動命令? 用法基本和cp類似
??? 不同點? 1 重命名?? mv? source dest?? 在同一目錄中重命名一個原
???????????????? 2 沒有遞歸選項? 操作文件或者目錄都可以正常操作
3. install??? 不能復制目錄,只能文件。復制的文件有權限,主要用于制作RPM包
SYNOPSIS
?????? install [OPTION]... [-T] SOURCE DEST
?????? install [OPTION]... SOURCE... DIRECTORY
?????? install [OPTION]... -t DIRECTORY SOURCE...
?????? install [OPTION]... -d DIRECTORY...???
DESCRIPTION
?????? This? install? program? copies? files (often just compiled) into destination locations you choose.? If you want to download and install a ready-to-use package on a GNU/Linux
?????? system, you should instead be using a package manager like yum(1) or apt-get(1).
?????? In the first three forms, copy SOURCE to DEST or multiple SOURCE(s) to the existing DIRECTORY, while setting permission modes and owner/group.? In the 4th form,? create? all
?????? components of the given DIRECTORY(ies).
?????? Mandatory arguments to long options are mandatory for short options too.
?????? --backup[=CONTROL]
????????????? make a backup of each existing destination file
?????? -b???? like --backup but does not accept an argument
?????? -c???? (ignored)
?????? -C, --compare
????????????? compare each pair of source and destination files, and in some cases, do not modify the destination at all
?????? -d, --directory
????????????? treat all arguments as directory names; create all components of the specified directories
?????????????????????? 創建目錄
?????? -D???? create all leading components of DEST except the last, then copy SOURCE to DEST
?????? -g, --group=GROUP
????????????? set group ownership, instead of process’ current group
?????? -m, --mode=MODE
????????????? set permission mode (as in chmod), instead of rwxr-xr-x
?????? -o, --owner=OWNER
????????????? set ownership (super-user only)
?????? -p, --preserve-timestamps
????????????? apply access/modification times of SOURCE files to corresponding destination files