18
2
From the bash man pages about viewing permissions with ls:
User ls output
Owner -rwx------
Group ----rwx---
Other -------rwx
That makes sense, but what is the first -
used for then? It's always blank in all the user contexts.
18
2
From the bash man pages about viewing permissions with ls:
User ls output
Owner -rwx------
Group ----rwx---
Other -------rwx
That makes sense, but what is the first -
used for then? It's always blank in all the user contexts.
35
The first dash -
indicates that the file is a regular file.
GNU Coreutils: 10.1.2 What information is listed
These options affect the information that
ls
displays. By default, only file names are shown....
‘-l’
‘--format=long’
‘--format=verbose’
In addition to the name of each file, print the file type, file mode bits, number of hard links, owner name, group name, size, and timestamp (see Formatting file timestamps), normally the modification time. Print question marks for information that cannot be determined.
...
The file type is one of the following characters:
‘-’
regular file
‘b’
block special file
‘c’
character special file
‘C’
high performance (“contiguous data”) file
‘d’
directory
‘D’
door (Solaris 2.5 and up)
‘l’
symbolic link
‘M’
off-line (“migrated”) file (Cray DMF)
‘n’
network special file (HP-UX)
‘p’
FIFO (named pipe)
‘P’
port (Solaris 10 and up)
‘s’
socket
‘?’
some other file type
2When I first saw the documentation for a D
oor file on Solaris, I immediately set about creating a Door! – Mark Stewart – 2016-08-31T02:33:09.110
2Were you successful? – Steven – 2016-08-31T03:10:31.457
7Yes, but I didn't know how to use it! But at least I saw the D
– Mark Stewart – 2016-08-31T05:02:31.753
12
It'll be a d
for a directory, l
for a symbolic link, c
for a character device, b
for a block device, p
for a FIFO (first-in first-out special file), s
for a socket.
6
Pedantically speaking, the vast majority of http://ss64.com/bash/ has absolutely nothing to do with Bash. Most of those are external programs accessible from any shell or even from
– Paused until further notice. – 2016-08-30T16:26:45.353exec()
-type calls from programming languages such as C or Python. Practically, one might think of them as "Bash commands", but it's useful and important to understand the difference, especially when writing scripts, for example, that might be run on systems other than Linux or even among different distributions of Linux.