in the in Linux systems, the command used to copy files or directories is CP, which can copy the source files to the target file or complicate multiple source files to the target directory. command format:CP [ option ] Source Address (file or directory) destination Address (file or directory)Command options:-A,--archive equivalent to -dr,--preserve=all--backup[=control] Create a backup for a target file that already exists- b similarto-backup, but do
CP"function description": The CP instruction is used to copy a file or directory, such as specifying more than two files or directories at the same time, and the final destination is an existing directory, it will copy all the previously specified files or directories into this directory. If you specify multiple files or directories at the same time, and the final destination is not an existing directory, a
1. Function: Copy files or directories2. Usage:CP [OPTION] ...[-T] SOURCE DEST Copy the file to another file;CP [OPTION] ...SOURCE ... Directory to copy files to the directoryCP [OPTION] ...-t DIRECTORY SOURCE:3. Parameters:-A,--archive, quite with simultaneous formulation of DPR parameters-B--backup[=control] backup before copying-D is the same as--no-dereference--preserve=links-F,--force forcibly copy files or directories, regardless of whether the
Recent projects in the data export when the problem occurs, the basic idea is:First Vfork Create a process, the child process creates 2 threads, thread 1 is responsible for the interface display, thread 2 is responsible for the data copy; The parent process saves the configuration file and exits the application;Where thread 2 also creates a process to invoke the System CP command, and Threads 1 Vfork uses the class System command function to send the
When we complete a library and prepare to publish it, we usually copy it to a sorted directory, like this: CP bin/libxxx.so* $DEST _dir
The result, however, is that the document, which was originally Soft-link, became a ' real ' document. This result has 2 bad: First, occupy the disk space; Second, sometimes it makes you make mistakes.
I met today with the problem of (CP before, but not today). The firs
Testin cloud testing mobile game quality manager's seven weapons helped CP dominate the world testin product evaluation
In the martial arts arena, experts do not need martial arts or powerful weapons. Some places have rivers and lakes, and the mobile game industry is also cool. How can we ensure the quality of our games? How can we take advantage of competitors? Weapons are essential. Testin cloud testing mobile game quality manager Seven Weapons assi
Unix cp command, unixcp
[Syntax]: cp [-p] [-r] File 1 [file 2...] Target
[Description]: Set file 1 (file 2 ...) if the object is a file name, only one file can be copied. if the object is a directory, multiple files can be copied, if the target file does not exist, create this file. If yes, overwrite the previous content. If the target file is a directory, copy the file to this directory.-I will prompt
CP Command for LinuxFeatures: Copying Files or directoriesNote: The CP instruction is used to copy files or directories, such as specifying more than two files or directories at the same time, and the final destination is an existing directory, it will copy all the previously specified files or directories into this directory. If you specify multiple files or directories at the same time, and the final dest
14:57 b.txt~-rw-r--r--1 root root 0 4 14:45 c.txt[[email protected] txt]# cat B.txt1234567890[[email protected] txt]# cat B.txt~abcdefghi5) Extension:-B does not accept parameters, and MV will read the environment variable Version_control as a backup strategy.--backup This option specifies a total of four backup strategies if the target file is present:1.control=none or off: not backed up.2.control=numbered or T: Digitally numbered backup3.control=existing or nil: if there is a digitally number
L CP command for InuxFeatures: Copying Files or directoriesNote: The CP instruction is used to copy files or directories, such as specifying more than two files or directories at the same time, and the final destination is an existing directory, it will copy all the previously specified files or directories into this directory. If you specify multiple files or directories at the same time, and the final des
This example of the book needs to be supported in Ubuntu's lower version of the system, and now basically does not support, want to implement it is very simple to write a script to back up and then delete.Alias has just made a replacement.Alias rm= ' CP [email protected] ~/backup; RM [email protected] 'RM text.txtwas converted into aCP [email protected] ~/backup; RM [email protected] text.txt thatCP ~/backup; RM text.txtYou can see that text.txt has b
Tags: LinuxDirectory processing command (bottom) Delete empty directoryrmdir【目录名】Delete a non-empty directory or filerm -rf 【目录/文件】-rDelete Directory-fForcedSimply rm or rm -r would you really want to delete files or directories?Do not hit rm -rf / will erase all files under the root directory!!!Copy commandcp 【选项】【原文件/目录】【目标目录】-rCopy Directory-pJoint file attribute replication-dWakahara file is a linked file, copy the link property-aEquivalent to-PDR, guaranteed to be identical to the original
The CP does not seem to exclude the directory functionality, you can use the rsync command to implement, such as:
Case
The/home/php-note directory contains the data directory, the data directory contains a, B, C, D, e five directories, now to the data directory in addition to the E directory of all directories copied to the/bak directory.
Operation
Yum Install rsync #安装rsync
cd/home/php-note/
Rsync-av--exclude data/a--exclude data/b--exclude dat
Transferred from: http://www.jb51.net/LINUXjishu/70474.htmlLinux provides us with two commands for file copy, one for CP and one for SCP, but they are slightly different.CP---mostly used to copy files between different directories on the same computerSCP---The main is to copy files between different Linux systems back and forthFor specific uses of CP:Command basic format:CP [OPTIONS] source DEST---from the source path copy file to the destination path
Because now mainly responsible for modem (CP), AP-side related code porting, now do a porting directory related collation, for future reference.
The new project needs to porting some necessary QMI interfaces, the related code of common at commands, the configuration of RF, etc.
1 QMI Interface:
CP End: modem_proc/mmcp/mmode/qmi/~
Qmi_voice.c
Qmi_voice.h
Qmi_voice_cm_if.c
Qmi_voice_cm_if.h
modem_proc/qmimsgs
Features: Copying Files or directoriesNote: The CP instruction is used to copy files or directories, such as specifying more than two files or directories at the same time, and the final destination is an existing directory, it will copy all the previously specified files or directories into this directory. If you specify multiple files or directories at the same time, and the final destination is not an existing directory, an error message appearsPar
turn: Linux CP/SCP Command +SCP command detailedName: CPUsage rights: All usersHow to use:CP [Options] Source DestCP [options] source ... directoryNote: Copy one file to another file, or copy several files to another directory.The meter-A as far as possible file status, permissions and other information are reproduced as original.-R If the source contains a directory name, the files under the directory are also copied to the destination.-F If a destin
Features: Copying Files or directoriesNote: The CP instruction is used to copy files or directories, such as specifying more than two files or directories at the same time, and the final destination is an existing directory, it will copy all the previously specified files or directories into this directory. If you specify multiple files or directories at the same time, and the final destination is not an existing directory, an error message appearsPar
As LS |less-mn meaning to output the LS result to less[ls] = = Pipe = = [More]ls commandLs-a Show hidden files Ls-t sorted by timestamp ls-fLs-l Show Long columnsLs-r Recursive display of informationCreate a file Touch Create a folder mkdirmkdir dir3 dir4 DIR5 Create multiple foldersmkdir ~/games Create the Games folder in this directory of logged-in usersMkdir-p DIR6/DIR7/DIR8 Creating multi-tier foldersCopying a replicated folderExample:-->tomcat -Other--Folder-->tomcat_2 Steps#cd Tomcat into
The following script backs up all the source files to be edited into the/bak directory, and all path locations remain unchanged, such as Vii/etc/hosts, and the/etc/hosts is copied to/bak/etc/hosts.
# CAT/SH/VII
#!/usr/bin/bash
#判断源文件是否存在, exist to perform a backup operation
If [F "$"];then
#创建函数, you can implement any key to continue
#如果你的机器上不认stty Raw, then replace the two occurrences of raw in the function with Cbreak
Get_char ()
{
Savedstty= ' Stty-g '
Stty-echo
Stty Raw
DD If=/de
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.