Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux ln command - create a file / directory link     - apt-get install openstack pkg Troubleshooting (Linux)

- Configuration based on open source Lucene Java development environment (Server)

- How dependent on Fedora, CentOS, RHEL check RPM packages (Linux)

- To delete the directory and all specified files under the Mac (Linux)

- Linux serial debugging tools xgcom install (Linux)

- hexdump Linux command (Linux)

- Installation and configuration of phpMyAdmin under CentOS (Database)

- Ubuntu the ARP (arptables) (Linux)

- AppCode developed Mac OS X application or shared library experience summary (Programming)

- Ubuntu How to install and upgrade Linux Kernel 3.15 (Linux)

- Memcached distributed caching (Server)

- Linux system Perl Lite netstat (Linux)

- Java Virtual Machine Basics (Programming)

- Django1.5 Custom User Model (Programming)

- Lua4.0 interpreter documents (Programming)

- Under CentOS 7 installation and deployment environment Ceph (Server)

- How x2g0 install Remote Desktop on Linux VPS (Server)

- How to Install 3.16.7 CKT2 kernel in Ubuntu 14.10, Ubuntu 14.04 and its derivative versions (Linux)

- Ubuntu uses conky add desktop control (Linux)

- Examples of Exploration Class File (Programming)

 
         
  Linux ln command - create a file / directory link
     
  Add Date : 2018-11-21      
         
         
         
  1. Use way: ln [option] source_file dist_file
                    When -f is established, it will be deleted with the file name.
                    For questioning before -i deleted.
                    ln -s abc cde establish abc soft links
                    ln abc cde abc hard to establish the connection,
2. The difference between soft and hard links link (popular):

Hard links can be thought of as a file has two file names; and soft link is a link to a new system file that points to the file it refers to

ln -s / root / lntest / source / / root / lntest / dist /

Here is a link to see the soft Shortcuts

3. The difference between soft links and hard links (explain):

Linux soft and hard-wired connection

For a file, there is a unique index corresponding contacts, while the index for a number of contacts, but can have multiple file names corresponding thereto. Thus, in the same file on the disk you can go to access the file through a different path. Note that in Linux is ah, folders, plus a new hard drive file ... Everything can be watched file to handle ah.

Connected with a soft and hard-wired connection (hard link) points, the flexible connection (symbolic link) called symbolic links. Symbolic link is a shortcut to Windows.

Not hard to establish a folder connection, we usually use more or soft connection.

eg:

ln -s source dist # establish a flexible connection

ln -s / mnt / hgfs / / home / luo / note "/" is the file links all over the back of the catalog must be added, otherwise the build directory show unusual colors, you still can not access, such as cd into do not

ln source dist # establish a hard link

Soft link is really just a piece of text, which contains the name of the file it points to the location of the file system automatically jump to see the soft link after corresponding processing; on the contrary, hard to open a new connection for the file directory entry, hard links to the original file name is affirmative, and in Linux it seems that they are equivalent. For this reason, hard links can not be connected to two different files on the file system.

(1) soft links can span file systems, not hard-wired. Practice method is to use a shared file to aa.txt text document attached to the lower windows under linux / root directory under bb, cc. Ln -s aa.txt / root / bb successful connection. ln aa.txt / root / bb fail.

(2) I node on the issue. Hard-wired no matter how many are pointing to the same I node, the node will increase the number of connections, as long as the connection node is not 0, the file has existed, whether you delete the source files are still connected. As long as there exists a file exists (in fact, do not distinguish what source connection file, because they are all pointing to the same node I). When you modify the source document or connection file any one time, other documents will be made to synchronize changes. Soft links do not directly use the i-node number as a file pointer, but the use of the file path name as a pointer. So delete the connection file has no effect on the source file, but delete the source file, the file will not find the connection to point to a file. Soft link has its own inode, and a small piece of space on disk storage path name.

(3) soft links to the file name can be a non-existent connection.

(4) soft connection can connect to the directory.

Note: I node: it is used to describe the internal data structures UNIX file characteristics we usually say I node as a file index nodes (node information) .i node containing the most important information about the file, including file data blocks. address on the disk. each node has its own I flag number, we call information 1. file sequence number .I node contains file owner relationship type 2. 3. 4. time file access file cut.
     
         
         
         
  More:      
 
- CentOS7 virtual machine creation failed Solution (Linux)
- Android Delete project useless resource file (Programming)
- Install GAMIT / GLOBK 10.50 software under Ubuntu 14.04 (Linux)
- phpinfo (): like phpinfo as a Python script (Programming)
- How to install and use the Snort in Ubuntu 15.04 (Linux)
- Linux LVM space expansion Demo (Linux)
- Linux installation and error under codeblocks exclude [Ubuntu 10.04] (Linux)
- Use window.name + iframe cross-domain access to data Detailed (Programming)
- Hibernate Performance Optimization of EHCache cache (Programming)
- Java object serialization and deserialization (Programming)
- ASM learning overview (Database)
- AngularJS - Getting Started with Routing (Programming)
- Perl loop (Programming)
- CentOS 7 virt-manager can not connect a local hypervisor (Linux)
- VMware virtual machines to install virt-manager unable to connect to libvirt's approach (Linux)
- C ++ why we chose to use the smart pointer (Programming)
- How to achieve the MySQL Oracle table associated with the two operations update (Database)
- Getting Started with Linux system to learn: How do I know which processes are running on the CPU core (Linux)
- Ubuntu 14.10 / 14.04 / 12.04 virtual users to install the printing software Boomaga (Linux)
- CentOS install video converter FFmpeg and cutting tools segmenter (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.