change ``bash headers to
``sh
This commit is contained in:
@@ -7,7 +7,7 @@ When a program encounters a soft link, it will make a guess at whether it shoul
|
||||
|
||||
To make a soft link to a file in the current directory, linking is easy:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
fortune > $file_1
|
||||
ln -s $file_1 $link_1
|
||||
```
|
||||
@@ -27,14 +27,14 @@ dir_0/
|
||||
|
||||
Inside `dir_1`, making a soft link to `dir_0/file_1` would mean putting the directions to that file:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
cd dir_1
|
||||
ln -s ../file_1 link_1
|
||||
```
|
||||
|
||||
The real content of the file is just '`../file_1`, so making it from another directory would mean writing exactly the same address to that file:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
ln -s ../file_1 dir_2/link_2
|
||||
```
|
||||
|
||||
@@ -54,7 +54,7 @@ dir_0/
|
||||
|
||||
Since it's just an address, you can delete the original file, then make another.
|
||||
|
||||
```bash
|
||||
```sh
|
||||
rm file_1
|
||||
ls -l dir_1/
|
||||
fortune > file_1
|
||||
@@ -65,7 +65,7 @@ cat dir_1/link_1
|
||||
|
||||
Last, let's make a link from `dir_2/link_2` to `dir_1/file_1` (this will delete the old link):
|
||||
|
||||
```bash
|
||||
```sh
|
||||
ln -s -f ../dir_1/file_1 dir_2/link_2
|
||||
cat dir_2/link_2
|
||||
```
|
||||
|
Reference in New Issue
Block a user