Usually after logging in to the base server remotely, the default is to log in to the working directory /home/IC.
However, our own working directory is far away, and we need to go through multiple jumps to reach our own working directory.
那在Linux里可不可以建立一个快捷方式,直接链接到另一个目录呢。
We can use the ln
command here :
its function is to establish a synchronized link for a certain file in another location;
the most commonly used parameter of this command is -s
, the specific usage is:
ln -s [源文件或目录][目标文件或目录]
When we need to use a file or folder in other directories, we just need to ln
link it with commands in other directories .
E.g:
ln -s /home/IC/Projects/Lab1 /home/IC/test
Now under the directory /home/IC/test
, /home/IC/Projects/Lab1/
a shortcut to the folder is created .
That is /home/IC
, type in the directory and you cd test
can jump directly to it /home/IC/Projects/Lab1/
.