Linux temperature – 4- file link

ln can link files, similar to windows shortcuts

 ln -s zxw.txt z.lnk

Share pictures

Delete the original file

rm zxw.txt

After the source file is deleted, as shown in the figure below, the path starts to be marked in red and flashes

Share Picture

/tmp and /var/ The difference between tmp

The time of temporary storage under /tmp is shorter, and the time of temporary storage under /var/tmp is longer

stickbit

When there are folders shared by multiple users on the server, you can configure the folder to enter stickbit mode. In this mode, you cannot delete files that are not created by the current user.

Use chmod o +t can be added to ensure that users can only create and delete files created by themselves

chmod o+t test/

Before adding permissions:

Share pictures

After permission is added:

share picture

< p>

Note: After the permissions are added, files created by other users cannot be deleted among ordinary users. The root user can still delete files< /p>

ln -s zxw.txt z.lnk

< pre>rm zxw.txt

chmod< /span> o+t test/

Leave a Comment

Your email address will not be published.