SYMLINKS / HARDLINKS

por | 26 agosto, 2008

### SMYLINKS / SOFT ###
Note: Symlinks may traverse file systems & point to directories
Softlinks

ln -s source(file/directory) target (any directory)

Note: use ls -Ll symlink_name to reveal symlink’s TRUE permissions
Note: symlinks are created with 777 permissions

The target exits or you dont have permissions use:
ln -fs /curl* curl

### HARDLINKS ###
ln without s option

ln source target


Note: Source & Target (destination) MUST reside within the same file system

Each file systems allocates a set number of INODES with likely overlap in Inode numbers across file systems

/ – 10 GB – 10,000 Inodes
/var – 20 -GB –

For first 10GB of 20GB – 10,000 Inodes 1 -10,000
For second 10GB of 20GB – 1,000 Inodes 10,001 – 20,000

ls -il – reveals file inodes


ls -i
total 7163
292292 drwxr-xr-x 2 root root 512 Aug 8 09:01 Desktop
292279 drwxr-xr-x 2 root root 512 Aug 8 09:01 Documents
1519 lrwxrwxrwx 1 root root 9 Aug 8 02:09 bin -> ./usr/bin
2803 drwxr-xr-x 6 root sys 512 Aug 8 04:20 boot
44822 -rw------- 1 root root 3331728 Aug 21 15:06 core

Note: Hard Links must reside within the same file system

Next… DEVICES & DRIVERS…

Categoría: Nix