The output of ls -l command yields the following result:    What is the number field between file permission and owner? i.e. what are those 1, 1, 1, and 2? I checked the --help but that doesn't explain it.  [EDIT]  I thought it was the number of files in a directory but it isn't. See image. "tempFolder" has 3 files but still show a "2"
27191
The ls -al command shows the following output;  -rwxrw-r--    10    root   root 2048    Jan 13 07:11 afile.exe   What are all the fields in the preceding display?
5015
I changed permissions of a file (chmod g+w testfile) and running ls -l testfile gives:  -rwxrwxr-x 1 user1 user1 0 2011-01-24 20:36 testfile   I then added a user to that group ("/etc/group" has user1:x:1000:user2 line), but am failing to edit that file as user2. Why is this so?
113805
Recently back to Linux from another operating system I noticed a file called [ which seems strange to me.  What is it for?  $ ls -l /usr/bin | head -2 -rwxr-xr-x 1 root root       39552 Nov  3 14:44 [   I'm using Ubuntu 15.04
98583
CentOS 5.9   I came across an issue the other day where a directory had a lot of files.  To count it, I ran ls -l /foo/foo2/ | wc -l  Turns out that there were over 1 million files in a single directory (long story -- the root cause is getting fixed).   My question is: is there a faster way to do the count?  What would be the most efficient way to get the count?
70440
I've been studying about the command line and learned that | (pipeline) is meant to redirect the output from a command to the input of another one. So why does the command ls | file doesn't work?  file input is one of more filenames, like file filename1 filename2  ls output is a list of directories and files on a folder, so I thought ls | file was supposed to show the file type of every file on a folder.  When I use it however, the output is:      Usage: file [-bcEhikLlNnprsvz0] [--apple] [--mime-encoding] [--mime-type]         [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...     file -C [-m magicfiles]     file [--help]   As there was some error with the usage of the file command
52005
Possible Duplicate:          when I type ls -la I get this familiar output...  drwxr-xr-x+  38 kent  staff       1292 Nov  6 11:09 . drwxr-xr-x    5 root  admin        170 Aug 14 14:11 .. -rw-r--r--@   1 kent  staff         16 Jun 18 14:13 .AB64CF89 -rw-------    1 kent  staff          3 May  5  2009 .CFUserTextEncoding -rw-r--r--@   1 kent  staff      15364 Nov  6 11:11 .DS_Store   my question is about the file settings on the far left eg:  drwxr-xr-x+   I know that the first char 'd' means directory. and the next 9 chars I understand as well (permissions) but what is the final char in this field? (empty or + or @ )
30210
If I have two users called john and sally. Both are part of the users group. john creates a directory with permissions 775. sally then puts a file there with 644 permissions.  Even though the file obviously has no group write privileges. Can john then modify/delete that file in the directory he owns but the file he does not own?
111963
Is there a way to list a set of say, 30 random files from a directory using standard Linux commands? (in zsh)  The top answer described  does not work for me (sort does not recognize the option -R)
81833
Just started reading a bit about the linux file system. In several places I found quotes like this one:      Unix directories are lists of association structures, each of which contains one filename and one inode number.   So I expected to find out that each directory would contain the names of the files under it, with each file mapped to an inode. But when I do vim directory_name in ubuntu, I get something like this:  " ============================================================================ " Netrw Directory Listing                                        (netrw v156) "   /Users/user/workspace/folder "   Sorted by      name "   Sort sequence: [\/]$,\&lt;core\%(\.\d\+\)\=\&gt;,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$ "   Quick Help: &lt;F1&gt;:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special " ============================================================================== ../ ./ folder1/ folder2/ file1 file2   I expected to see an inode number next to each file name, why isn't this the case?
1738
I've noticed that when I do a:  ls -ls file   It provides block count, say 8 blocks.  When I do:  stat file   I notice that the block count is 16, twice the number given by ls.   The block size on my file system is 4096. I learned that the arbitrary unit for blocks used by ls is 1024. Is it correct to say that stat uses an arbitrary unit of 512 bytes when reporting blocks?  If so, is there a reason for the inconsistency?  I'm running Ubuntu 11.10 on an ext4 file system.
12687
Using . Everything works fine, but it appears there are limits - when selecting more than 15 folders, &quot;Take Ownership&quot; context menu entry disappears. Same goes with files, 15 is maximum. Where does that limit of 15 come from and why does it exist?
77169
Sometimes I see a command like  find . -name * -exec ls -a {} \;   I was asked to execute this.  What does {} \; mean here?
33970
I am trying to get a list of open files per process. I ran the following one-liner from :  lsof | perl -lane '$x{"$F[0]:$F[1]"}++; END { print "$x{$_}\t$_" for sort {$x{$a}&lt;=&gt;$x{$b}} keys %x}'   It returns the total count of open files, and the process name and pid. The result is sorted in ascending order, and the last line is as follows:  1065702 java:15437   So when I run lsof -p 15437, I would expect it to return the same number, however I'm getting:  $ lsof -p 15437 | wc -l 403   Why the discrepancy?  Addendum  A third source of discrepancy:  $ cd /proc/15437/fd $ ls -1 | wc -l 216
75553
I'm using these commands:    du -sh --apparent-size ./* du -sh ./*   both reporting:    4.0K    ./Lightroom_catalog_from_win_backup 432M    ./Lightroom catalog - wine_backup   while those directories contain:    $ll ./"Lightroom catalog - wine_backup" total 432M -rwxrwx--- 1 gigi gigi 432M Mar 18  2018 Lightroom 5 Catalog Linux.lrcat -rwxrwx--- 1 gigi gigi  227 Nov 21  2015 zbackup.bat $ll ./Lightroom_catalog_from_win_backup total 396M -rwxrwx--- 3 gigi gigi 396M Dec 17 09:35 Lightroom 5 Catalog Linux.lrcat -rwxrwx--- 3 gigi gigi  227 Dec 17 09:35 zbackup.bat   Why du is reporting 4.0K for ./Lightroom_catalog_from_win_backup and how could I make it to report correctly?  PS: other system information:    $stat --file-system $HOME   File: "/home/gigi"     ID: 5b052c62a5a527bb Namelen: 255     Type: ext2/ext3 Block size: 4096       Fundamental block size: 4096 Blocks: Total: 720651086  Free: 155672577  Available: 119098665 Inodes: Total: 183050240  Free: 178896289  $lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 16.04.5 LTS Release:        16.04 Codename:       xenial
92606
When I run chmod +w filename it doesn't give write permission to other, it just gives write permission to user and group.  After executing this command  chmod +w testfile.txt   running ls -l testfile.txt prints  -rw-rw-r-- 1 ravi ravi 20 Mar 10 18:09 testfile.txt   but in case of +r and +x it works properly.  I don't want to use chmod ugo+w filename.
32997
I know that I can use ls -l to list all the files in a directory including their permissions, but how do I see the permissions of a specific directory. For example if I wanted to see the permissions for my /etc directory?
11145
I have a directory with a large number of files. I don't see a ls switch to provide the count. Is there some command line magic to get a count of files?