日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

GUN/LINUX命令之 cp mv install

發布時間:2023/12/18 linux 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 GUN/LINUX命令之 cp mv install 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

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

轉載于:https://www.cnblogs.com/gailuo/p/5041299.html

總結

以上是生活随笔為你收集整理的GUN/LINUX命令之 cp mv install的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。