The use of files and storage devices in Linux differs from that of Windows. Although there are also files and hierarchical directory structures, you need to create a different mindset.Listing 1. Directory structure/|--bin|--boot|--dev|--etc|--mnt|--opt| | --ibm| | | --webspherestudio| | '--db2| | --ibmhttpserver|--root|--sbin|--tmp|--usr| | --x11r6| | | --bin| | | --include| | | --lib| | | --man| | '--share| | --bin
The CP command is more commonly used in Linux VPS operations and applications, and can be used to copy files or folders, rename a new file, and copy files to other paths for transfer.
Example usage:
1. Copy the itbulu.com.jpg file from the root directory to the/wwwroot/web directory
cd/root/Cp-v itbulu.com.jpg/wwwroot/web/
2, copy itbulu.com.jpg
administrators to hard link their directories.-S: Symbolic Link ).-B: Back up the files that will be overwritten or deleted during the link.There are two types of links: hard link and symbolic link ). By default, the ln command generates a hard link.Hard connection refers to the connection through the index node. In a Linux File System, a
first.-D: allows system administrators to hard link their directories.-S: Symbolic Link ).-B: Back up the files that will be overwritten or deleted during the link.There are two types of links: hard link and symbolic link ). By default, the ln command generates a hard link.Hard connection refers to the connection through the index node. In a Linux File System, a
permission is for all users.
2. Format
Ln [Options] source file [Link name]
3. Parameters
-F: when the link is completed, the source file is deleted first.
-D: allows system administrators to hard link their directories.
-S: Symbolic Link ).
-B: Back up the files that will be overwritten or deleted during the link.
There are two types of links: hard link and sym
*.c finished
Directive Name: LNUsage rights: All usersHow to use: ln [options] Source dist, where option is in the format:[-BDFINSVF] [-S Backup-suffix] [-v {numbered,existing,simple}][--help] [--version] [--]Note: In the Linux/unix file system, there is a so-called link, we can consider it as the alias of the file, and the link can be divided into two type
As you can see from the above information, you can see the/PROC/2699/FD/1 to get the data you want to recover. If you can view the data by using a file descriptor, you can use I/O redirection to copy it to a file, such as:
The code is as follows
Copy Code
CAT/PROC/2699/FD/1 >/var/log/messages
Before the recovery
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=ex
command is used to create links between files. its permission is for all users.
2. Format
Ln [options] source file [link name]
3. parameters
-F: when the link is completed, the source file is deleted first.
-D: allows system administrators to hard link their directories.
-S: Symbolic Link ).
-B: back up the files that will be overwritten or deleted during the li
, it cannot be uninstalled normally. You can run the following command to view and stop all operations on the file system, and then uninstall the file system;Fuser-V device file name or mount pointCheck which service or user is operating on the file system;Fuser-km device file
Lin Bingwen Evankaka original works. Reprint please specify the source Http://blog.csdn.net/evankakaAbstract: This article mainly describes the Linux command Daquan----common file Operation command, and attached an exampleLsThis command is often used to show what files are in the current directory, LS the most commonly used parameters are three:-a-l-F.Ls-aDescription: The files on
There are many ways to recover data, such as hot and cold backup and flash back to the database. If you delete data files directly from the operating system OS, there are some preferred methods in the LinuxUnix environment.
There are many ways to recover data, such as hot and cold backup and flash back to the database. If you delete data files directly from the operating system OS, there are some preferred
Transferred from: http://blog.csdn.net/eckelwei/article/details/17078187Sometimes when you open a file with Vim, you are prompted with information similar to the following:Discovery Interchange File ". Exportcert.cpp.swp"Owner: Liuchuanliang Date: Thu Mar 1 17:15:41 2012File name: ~liuchuanliang/ftsafe/entersafe-shuttle-linux-111114/i386/sample2/source/exportcert
1. Copy files using the CP command
This command is used to copy the given file or directory to another file or directory. It is very powerful like the Copy command in msdos.
Syntax: CP [Option] source file or directory target file or directory
Note: This Command copies the specified source
overwritten;D: Allow the system to use the dump command to do backup, you can not back up this file;• I: Let the file never change, can not delete or change the file name;J.: Let the system record the information of the file itself in the ext3 log, even if the ext3
messages[*] Support for devfs[*] Use the devpts filesystem for unix98 ptysBuild options --->[] Build busybox as a static binary (no share libs) this option is not selected, that is, the dynamic mode is used, which can save hundreds of KB of space.[*] Do you want to build busybox with a cross compiler?(/Home/BR/buildroot/build_arm/staging_dir/bin/ARM-Linux-uclibc-) Cross Compiler specifies the cross compiler path, that is, the cross compiler path buil
:
"-S" is sorted by file length. The longest file is in front
"-U" sorts files by the last access time
"-T" sort by file modification time
"-R" displays items in reverse order
"-R" displays the file information of the local directory and Its subdirectories.
"-U" is listed in the order of directories.
Multiple parameter
In terms of file systems, Linux can be regarded as a Swiss Army knife in the operating system. Linux supports many file systems, from log file systems to cluster file systems and encrypted fil
displayed asking the user to confirm before overwriting the target file. When the answer is Y, the target file will be overwritten, which is an interactive copy.
-P in addition to copying the source file content, CP also copies the modification time and access permissions to the new
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.