User Tools

Site Tools


bash:ls:link_count_is_zero

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
bash:ls:link_count_is_zero [2020/04/29 11:59] – created peterbash:ls:link_count_is_zero [2021/01/26 16:00] (current) – removed peter
Line 1: Line 1:
-====== BASH - ls - link count is zero ====== 
- 
-Running an **ls** command shows that the link count of the file or directory is showing as 0. 
- 
-For example: 
- 
-<code bash> 
-ls -al 
-</code> 
- 
-returns: 
- 
-<code bash> 
--rwxr-xr-x 0 peter peter  20M Apr 29 11:02 afile 
-</code> 
- 
- 
-The **0** after the three sets of permissions is the link count, and usually specifies the number of hard links the file has, or for directories the number of directories within the directory + this directory itself.  
- 
-<WRAP center round info 60%> 
-**NOTE**:  For any directory, the minimum amount of links should be at least 2 (self **.** and parent **..**) + the number of sub-directories, as long as the directory isn't rmdir'd. 
- 
-If the directory is deleted, then the link count is generally 0. 
-</WRAP> 
- 
----- 
- 
-===== Solution ===== 
  
bash/ls/link_count_is_zero.1588161557.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki