In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to use the In command in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Ln is a very important command in linux. Its function is to establish a synchronous link for a file in another location. The most commonly used parameter of this command is-s, which is used as follows:
Ln-s source file target file-s means symbolic.
Example: ln-s / lib/lsb / usr/lj
That is, create a lj file that points to the / lib/lsb directory in the usr directory.
When we need to use the same file in a different directory, we don't need to put the same file in every directory we need, we just put the file in a fixed directory, and then link it with the ln command (link) in another directory, without repeatedly occupying disk space. For example, ln-s / bin/less / usr/local/bin/less-s means code name (symbolic). There are two points to note here: first, the ln command keeps the synchronization of every linked file, that is, no matter where you change, the other files will change the same. Second, ln links and soft links and hard links two, soft link is ln-s *, it will only generate a file image in the location of your choice, will not take up disk space, hard link ln *, no parameter-s, it will generate a file of the same size in your selected location and the source file, whether soft link or hard link, the file will keep synchronized changes. Soft links can be across partitions, but hard links can only be within the same partition. If you look at a directory with ls and find that there is a @ symbol behind some files, that is a file generated with the ln command. Look at it with the ls-l command, and you can see the path to the displayed link. When we need to use the same file in a different directory, we don't need to put the same file in every directory we need, we just need to put the same file in a fixed directory. Put the file on, and then link it with the ln command (link) in another directory, without having to take up disk space repeatedly. For example: ln-s / bin/less / usr/local/bin/less
Note:
First, the ln command keeps the synchronization of every linked file, that is, no matter where you change, the other files will change the same.
Second, ln links and soft links and hard links two, soft link is ln-s *, it will only generate a file image in the location of your choice, will not take up disk space, hard link ln *, no parameter-s, it will generate a file of the same size in your selected location and the source file, whether soft link or hard link, the file will keep synchronized changes. Soft links can be across partitions, but hard links can only be within the same partition.
Third: directories can not establish hard links, but can establish soft links.
Thank you for reading! This is the end of this article on "how to use In commands in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.