Most operating systems have several mechanisms that allow you to give different names to files and directories to access the same file. In LINUX, there are two types: hard links and symbolic links. In the flow of the story, I will touch on inode first. All files are assigned a unique number called the inode number, which records the file type, size, access rights, etc. Is it equivalent to a foreign key in SQL? From here, the main subject is that a hard link can refer to that data from each file name if there is even one data stored on the disk, but there are multiple files that refer to it. The inode number assigned to the file and the created file does not change. In other words, if you change either, both will change. The symbolic link is then the pointer itself to the link source. Therefore, only the link source can be deleted, and in this case, the link source cannot be referenced from the symbolic link.
Create a link
Syntax: *** ln [optional] {link source} {link file name} *** You can create a symbolic link with the option -s, or a hard link without it.
Process monitoring
A process is the basic unit by which the OS manages a program.
Syntax: *** ps [optional] ***
I often use ***-ef *** as an option.
top - 18:04:13 up 17 days, 1:47, 2 users, load average: 0.00, 0.00, 0.00 Tasks: 128 total, 1 running, 127 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.3%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 1020488k total, 816472k used, 204016k free, 186292k buffers Swap: 2064376k total, 0k used, 2064376k free, 369096k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1874 root 20 0 433m 39m 9536 S 0.3 3.9 24:51.55 java 1 root 20 0 19360 1544 1224 S 0.0 0.2 0:01.25 init 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
Recommended Posts