<s>
The	O
seven	O
standard	O
Unix	B-Application
file	I-Application
types	I-Application
are	O
regular	O
,	O
directory	O
,	O
symbolic	O
link	O
,	O
FIFO	O
special	O
,	O
block	O
special	O
,	O
character	O
special	O
,	O
and	O
socket	O
as	O
defined	O
by	O
POSIX	O
.	O
</s>
<s>
Solaris	B-Application
doors	O
)	O
.	O
</s>
<s>
A	O
file	O
's	O
type	O
can	O
be	O
identified	O
by	O
the	O
ls	B-Application
-l	O
command	O
,	O
which	O
displays	O
the	O
type	O
in	O
the	O
first	O
character	O
of	O
the	O
file-system	O
permissions	O
field	O
.	O
</s>
<s>
For	O
regular	O
files	O
,	O
Unix	B-Application
does	O
not	O
impose	O
or	O
provide	O
any	O
internal	O
file	O
structure	O
;	O
therefore	O
,	O
their	O
structure	O
and	O
interpretation	O
is	O
entirely	O
dependent	O
on	O
the	O
software	O
using	O
them	O
.	O
</s>
<s>
However	O
,	O
the	O
file	B-Application
command	I-Application
can	O
usually	O
be	O
used	O
to	O
determine	O
what	O
type	O
of	O
data	O
they	O
contain	O
.	O
</s>
<s>
In	O
the	O
stat	B-Language
structure	I-Language
,	O
file	O
type	O
and	O
permissions	O
(	O
the	O
mode	O
)	O
are	O
stored	O
together	O
in	O
a	O
bit	O
field	O
,	O
which	O
has	O
a	O
size	O
of	O
at	O
least	O
12	O
bits	O
(	O
3	O
bits	O
to	O
specify	O
the	O
type	O
among	O
the	O
seven	O
possible	O
types	O
of	O
files	O
;	O
9	O
bits	O
for	O
permissions	O
)	O
.	O
</s>
<s>
This	O
format	O
can	O
be	O
seen	O
in	O
git	B-Application
,	O
tar	B-Application
,	O
and	O
ar	B-Application
,	O
among	O
other	O
places	O
.	O
</s>
<s>
Take	O
for	O
example	O
one	O
line	O
in	O
the	O
ls	B-Application
-l	O
output	O
:	O
</s>
<s>
The	O
GNU	B-Application
coreutils	I-Application
version	O
of	O
ls	B-Application
uses	O
a	O
call	O
to	O
filemode( )	O
,	O
a	O
glibc	B-Language
function	O
(	O
exposed	O
in	O
the	O
gnulib	B-Application
library	O
)	O
to	O
get	O
the	O
mode	O
string	O
.	O
</s>
<s>
Regular	O
files	O
show	O
up	O
in	O
ls	B-Application
-l	O
with	O
a	O
hyphen-minus	O
-	O
in	O
the	O
mode	O
field	O
:	O
</s>
<s>
As	O
several	O
filesystems	O
are	O
available	O
under	O
Unix	B-Application
,	O
both	O
native	O
and	O
non-native	O
,	O
there	O
is	O
no	O
one	O
directory	O
file	O
layout	O
.	O
</s>
<s>
A	O
directory	O
is	O
marked	O
with	O
a	O
d	O
as	O
the	O
first	O
letter	O
in	O
the	O
mode	O
field	O
in	O
the	O
output	O
of	O
ls	B-Application
-dl	O
or	O
stat	B-Language
,	O
e.g.	O
</s>
<s>
One	O
of	O
the	O
strengths	O
of	O
Unix	B-Application
has	O
always	O
been	O
inter-process	B-Operating_System
communication	I-Operating_System
.	O
</s>
<s>
Among	O
the	O
facilities	O
provided	O
by	O
the	O
OS	O
are	O
pipes	O
,	O
which	O
connect	O
the	O
output	O
of	O
one	O
process	B-Operating_System
to	O
the	O
input	O
of	O
another	O
.	O
</s>
<s>
This	O
is	O
fine	O
if	O
both	O
processes	O
exist	O
in	O
the	O
same	O
parent	O
process	B-Operating_System
space	O
,	O
started	O
by	O
the	O
same	O
user	O
,	O
but	O
there	O
are	O
circumstances	O
where	O
the	O
communicating	O
processes	O
must	O
use	O
FIFOs	O
,	O
here	O
referred	O
to	O
as	O
named	O
pipes	O
.	O
</s>
<s>
They	O
can	O
be	O
created	O
with	O
the	O
command	O
mkfifo	B-Device
as	O
in	O
mkfifo	B-Device
mypipe	O
.	O
</s>
<s>
A	O
socket	O
is	O
a	O
special	O
file	O
used	O
for	O
inter-process	B-Operating_System
communication	I-Operating_System
,	O
which	O
enables	O
communication	O
between	O
two	O
processes	O
.	O
</s>
<s>
In	O
addition	O
to	O
sending	O
data	O
,	O
processes	O
can	O
send	O
file	B-Application
descriptors	I-Application
across	O
a	O
Unix	B-Application
domain	O
socket	O
connection	O
using	O
the	O
sendmsg( )	O
and	O
recvmsg( )	O
system	O
calls	O
.	O
</s>
<s>
In	O
Unix	B-Application
,	O
almost	O
all	O
things	O
are	O
handled	O
as	O
files	O
and	O
have	O
a	O
location	O
in	O
the	O
file	O
system	O
,	O
even	O
hardware	O
devices	O
like	O
hard	O
drives	O
.	O
</s>
<s>
Unix	B-Application
makes	O
a	O
distinction	O
between	O
character	O
devices	O
and	O
block	O
devices	O
.	O
</s>
<s>
Although	O
,	O
for	O
example	O
,	O
disk	B-Application
partitions	I-Application
may	O
have	O
both	O
character	O
devices	O
that	O
provide	O
un-buffered	O
random	O
access	O
to	O
blocks	O
on	O
the	O
partition	B-Application
and	O
block	O
devices	O
that	O
provide	O
buffered	O
random	O
access	O
to	O
blocks	O
on	O
the	O
partition	B-Application
.	O
</s>
<s>
A	O
door	O
is	O
a	O
special	O
file	O
for	O
inter-process	B-Operating_System
communication	I-Operating_System
between	O
a	O
client	O
and	O
server	O
,	O
currently	O
implemented	O
only	O
in	O
Solaris	B-Application
.	O
</s>
