Search notes:

Shell command: ln

ln makes links between files.

-s

$ ln -s $target $symbolic_link_file
$target can be any name. It's not resolved until $symbolic_link_file is accessed.
$ mkdir x y
$ echo hello > x/to
$ ln -s x/to y/from
$ cat y/from              # Error: no such file or directory!
$ rm y/from
$ ln -s ../x/from y/from
$ cat y/from              # Prints 'hello'
$ cd y
$ cat from                # Prints 'hello'
After creating the symbolic link, the target of the link can be determined with readlink -f

-r

-r creates the symbolic links relative to the link location.

Create symbolic links from ~/bin to executables under a given directory

find $DIR -type f -executable -exec ln -s {} ~/bin \;

See also

Shell commands

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Linux/sh...', 1759398276, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Linux/shell/commands/ln(66): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78