I have read that hard links cannot be created for directories, so how is it possible for the 'home' directory to show 3 hard links? And how I can see what r the files hard linked to this directory.
Can you please help me understand what's the logic behind hard link number shown in ls -l?
for example, I have /linuxgr8/home directory and for home directory it shows 3 hard link.
I have shared the tree structure of home directory.
I created a new file using touch command with title as 'Desktop' (same name as Desktop directory). I am aware that I can use -d option with ls for checking file permission for 'Desktop' directory. However, I am wondering how can I check file permissions of 'Desktop' file specifically (please...
1. I copied 'passwd' file from /etc to home directory using 'cp' command, I have noticed that the ownership (from root to user) is changed. If I want to retain same ownership, how can I do that?
2. for the 'passwd' file I have following permission in my home directory:
-rw-r--r-- 1 rajat rajat...
What is 'S' and 'l' in below file permission?
(I know that similar question already asked in this thread but that 'S' is in directory flag place, however in this case it is in place of execution flag)
I have one doubt: Lets say I have created a file with name abc.txt and it has default permission as _rwxr_xr_x. So, if I want change it in to a directory (drwxr_xr_x) using Chmod, is it possible to change the directory flag or not?