当前位置:网站首页>install 命令
install 命令
2022-08-02 03:30:00 【跑不了的你】
install 命令
install 命令
功能:
install命令的作用是安装或升级软件或备份数据,它的使用权限是所有用户。install命令和cp命令类似,都可以将文件/目录拷贝到指定的地点。但是,install允许你控制目标文件的属性。install通常用于程序的makefile,使用它来将程序拷贝到目标(安装)目录。
语法:
install [OPTION]... [-T] SOURCE DEST
install [OPTION]... SOURCE... DIRECTORY
install [OPTION]... -t DIRECTORY SOURCE...
install [OPTION]... -d DIRECTORY...
常用选项:
-g,--group=Group:指定目标文件的属组;
-o,--owner=user:指定目标文件的属主;
-m,--mode=mode:指定目标文件的权限模式;
-S:设置目标文件的后缀;
-D:创建指定文件路径中不存在的目录;
使用实例:
[email protected]:~/disk_2/demo/demo1$ sudo install demo.patch /usr/local/etc/ -g root -o root -m 755
[sudo] jw 的密码:
[email protected]:~/disk_2/demo/demo1$ ls -l /usr/local/etc/
总用量 4
-rwxr-xr-x 1 root root 198 12月 30 17:30 demo.patch
[email protected]:~/disk_2/demo/demo1$ ls -l demo.patch
-rwxrwxrwx 1 root root 198 12月 30 13:58 demo.patch
[email protected]:~/disk_2/demo/demo1$ chm
chmem chmod
[email protected]:~/disk_2/demo/demo1$ sudo install demo.patch /usr/local/etc/ -g jw -o jw -m 755
[email protected]:~/disk_2/demo/demo1$ ls -l /usr/local/etc/
总用量 4
-rwxr-xr-x 1 jw jw 198 12月 30 17:31 demo.patch
[email protected]:~/disk_2/demo/demo1$ ls output/
[email protected]:~/disk_2/demo/demo1$ ls
demo.patch from_file output
[email protected]:~/disk_2/demo/demo1$ install -t output/ demo.patch from_file
[email protected]:~/disk_2/demo/demo1$ ls output/
demo.patch from_file
边栏推荐
猜你喜欢
【Arduino connects SD card module to realize data reading and writing】
与TI的lvds芯片兼容-GM8284DD,GM8285C,GM8913,GM8914,GM8905C,GM8906C,国腾振芯LVDS类芯片,
【土壤湿度传感器与 Arduino 测量土壤湿度】
【Popular Science Post】Detailed explanation of MDIO interface
网站开发方案研究
MIPI解决方案 ICN6202:MIPI DSI转LVDS转换芯片
【Arduino 连接DHT11 湿度和温度传感器】
ICN6211:MIPI DSI转RGB视频转换芯片方案介绍 看完涨知识了呢
博达工业云与阿里云对比
uniCloud address book combat
随机推荐
电子密码锁_毕设‘指导’
Comparative analysis of mobile cloud IoT pre-research and Alibaba Cloud development
所有子字符串中的元音 —— LeetCode - 2063
【科普贴】UART接口通讯协议
openmv学习 2022.5.9
Modify hosts file using batch script
蛮力法求解凸包问题
ArrayList LinkList效率对比
【NTC 热敏电阻与 Arduino 读取温度】
无向图的连通分支数(并查集)
USB_ID介绍
Scala 中的集合(二):集合性能比较
【MQ-2 可燃气体和烟雾传感器与 Arduino 配合使用】
回溯法 & 分支限界 - 2
物联网方案
AD PCB导出Gerber文件(非常详细的步骤)
字符串匹配(蛮力法+KMP)
无源域适应(SFDA)方向的领域探究和论文复现(第二部分)
[Arduino connected to GP2Y1014AU0F dust sensor]
Case | industrial iot solutions, steel mills high-performance security for wisdom