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

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/458564.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/458564.shtml
英文地址,請注明出處:http://en.pswp.cn/news/458564.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Tomcat - Maven plugin: 運行找不到webapp

2019獨角獸企業重金招聘Python工程師標準>>> The tomcat7-maven-plugin allows running the current project as a Web application and additional <webapps> can be specified that will be simultaneously loaded into tomcat. My project is not a Web ap…

面試題3

1. 你如何理解 iOS 內存管理 1. new alloc copy retain這些對象我們都要主動的release或者 autorelease 2. 如果是類方法創建的對象,那么系統自動釋放池自動在適當的 時候會幫我們 release 3. ARC xcode 自動會幫我們人工智能的添加 release autorelease 操 作 2. C語言里的數…

基于MQTT協議進行應用開發

來自&#xff1a;http://www.cnblogs.com/secondtononewe/p/6073089.html 官方協議有句如下的話來形容MQTT的設計思想&#xff1a; “It is designed for connections with remote locations where a "small code footprint" is required or the network bandwidth i…

SortedDictionaryTKey,TValue正序與反序排序及Dicttionary相關

SortedDictionary<TKey,TValue>能對字典排序 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;namespace SortDictionary {class Program{static void Main(string[] args){TestDictionarySort();…

DOS窗口的編碼頁從UTF-8調回GBK

2019獨角獸企業重金招聘Python工程師標準>>> 之前在DOS窗口操作MySQL數據庫的時候&#xff0c;將編碼頁從GBK設置成了UTF-8&#xff0c;解決了在DOS窗口顯示MySQL數據庫中的表中的中文字符出現亂碼的問題。但是除此之外&#xff0c;DOS窗口顯示的其他中文字符都是亂…

UIBezierPath

學習UIBezierPath畫圖 筆者在寫本篇文章之前&#xff0c;也沒有系統學習過貝塞爾曲線&#xff0c;只是曾經某一次的需求需要使用到&#xff0c;才臨時百度看了一看而且使用最基本的功能。現在總算有時間停下來好好研究研究這個神奇而偉大的貝塞爾先生&#xff01; 筆者在學習時…

系統架構設計理論與原則

一、無共享架構 1、無共享架構 無共享架構是一種分布式計算架構&#xff0c;這種架構中不存在集中存儲的狀態&#xff0c;系統中每個節點都是獨立自治的&#xff0c;整個系統中沒有資源競爭&#xff0c;這種架構具有非常強的擴張性&#xff0c;目前在web應用中被廣泛使用。 無共…

VS2010 教程:創建一個 WPF 應用程序 (第一節)

來自&#xff1a;https://msdn.microsoft.com/zh-cn/library/ff629048.aspx [原文發表地址] VS2010 Tutorial: Build a WPF App (Step 1) [原文發表時間] Friday, May 22, 2009 8:00 AM 這篇文章里&#xff0c;我將使用VS2010 Beta 1創建一個WPF 應用程序。并且 我將展示這個產…

js 日期星期 帶農歷

Weekday代碼 //得到當前日期如2009年6月19日 星期五 function getDate(){ var today new Date(); var x new Array("星期日", "星期一", "星期二","星期三","星期四", "星期五","星期六"…

FMDB的使用

// // FMDBmanager.h // database // // Created by PRL on 16/10/13. // Copyright © 2016年PRL. All rights reserved. // #import <Foundation/Foundation.h> interface FMDBmanager : NSObject{ FMDatabase * _db; } (FMDBmanager *)sharedManager; //獲取…

深入淺出WPF之Binding的使用(一)

from: http://www.cnblogs.com/akwwl/p/3421005.html 在WPF中Binding可以比作數據的橋梁&#xff0c;橋梁的兩端分別是Binding的源&#xff08;Source&#xff09;和目標&#xff08;Target&#xff09;。 一般情況下&#xff0c;Binding源是邏輯層對象&#xff0c;Binding目…

arm處理器中a5 a8 a9,v6 v7,arm7 arm9 arm11都是依據什么來分類的【轉】

轉自&#xff1a;http://blog.csdn.net/maochengtao/article/details/9951131ARM處理器發展這么多年&#xff0c;有很多架構&#xff0c;很多不同的內核 架構有armv1 v2 v3 v4 v5 v6 v7 內核太多了&#xff0c;比如armv1對應的是arm1&#xff0c;armv5對應的arm9&#xff0c;ar…

前端開發一些很有用的工具

apiview.com 接口規范管理平臺 restClient 谷歌瀏覽器接口測試工具 postman 接口測試工具 SSH Secure Shell Client 抓包工具 SSH SecureFile Transfer Client wireshark 抓包分析工具 Xshell linux遠程工具 Balsamiq Mockups 原型圖 visio 流程圖 xmind top圖 SourceCounter、…

所有的iPhone設備cell的寬度都是320,解決辦法是?

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { self.frameCGRectMake(0, 0, SW, 44); } return self; } 自己重設一下寬度就行了

深入淺出WPF之Binding的使用(二)

from: http://www.cnblogs.com/akwwl/p/3421250.html 在上一篇中介紹了Binding的基本綁定方法&#xff0c;這一篇中我們在深入的介紹Binding的其他用法。 Binding的源也就是數據的源頭&#xff0c;在日常的工作中&#xff0c;除了使用像上一篇中的Student對象作為數據源外&a…

iOS 推送

最近在研究ios的推送問題&#xff0c;遇到了一些問題&#xff0c;最終整理了一下。放在這里和大家分享APNS的推送機制首先我們看一下蘋果官方給出的對ios推送機制的解釋。如下圖 Provider就是我們自己程序的后臺服務器&#xff0c;APNS是Apple Push Notification Service的縮寫…

Bash判斷文件夾(目錄)是否存在

1 #!/bin/bash 2 if [ -d DirName ]; then 3 echo Dir exist 4 else 5 echo Dir not exist 6 fi 轉載于:https://www.cnblogs.com/imzye/p/5059031.html

iOS 加載本地html文件詳細操作

webView的加載&#xff0c;如果是純文本&#xff0c;有內部樣式的話&#xff0c;簡單的加載請求就可以了。如下: 這種加載簡單直接&#xff0c;易操作。 如果需要加載images&#xff0c;css文件 需要把xcode的項目請求路徑的位置告訴webView.代碼如下&#xff1a; 這樣html文件…

HDU 5573 Binary Tree 構造

Binary Tree題目連接&#xff1a; http://acm.hdu.edu.cn/showproblem.php?pid5573 Description The Old Frog King lives on the root of an infinite tree. According to the law, each node should connect to exactly two nodes on the next level, forming a full binary…

志邦櫥柜坑爹,志邦櫥柜大忽悠,志邦櫥柜欺騙

本人實實在在經歷的&#xff0c;志邦櫥柜就是個大忽悠,志邦櫥柜沒誠信!! 志邦櫥柜先騙客戶下訂單,在預算時低開,到真正簽合同時&#xff0c;不僅僅尺寸坑你,一大堆增項都會出來,原本1.5w預算到最后簽合同總價到2.2w,簽合同增項高開最后志邦櫥柜總價超預算非常非常離譜&#xff…