how many types of file in unix?
Answers were Sorted based on User's Feedback
Answer / sree ranjini
The file is the basic unit of the UNIX System.There are 3
main categories though in some text books symbolic
links/all special files are splitted and written as
seperate file type(It doesnt matter to whether there are 3
or 4 or 7 file types)
1.Regular files(-) -> includes text files + binary + image
files
2.Directory files(d)
3.Special files
3.1 Device Files
3.11 Character special devices(c)
3.12 Block special devices(b)
3.2 Links
3.21 Hard Links(really not a kind of file but
instead is a second name for a file.Seen as - regular
file type on ls -l)
3.22 Symbolic Link( l )
3.3 Socket(s)
3.4 Fifo ( p )
How to see the file type? simply type ls -l
text,binary are all seen as regular files.How do I get the
type->use file command -> eg $file * lists all file type in
curr dir.
REGULAR FILES( _ )
var/run/syslogd.pid: ASCII text
-rw-r--r-- 1 root root 5 2009-06-19
12:06 /var/run/syslogd.pid
$ile reciprocal
reciprocal: ELF 64-bit LSB executable, x86-64, version 1
(SYSV), for GNU/Linux 2.6.8, dynamically linked (uses
shared libs), not stripped
Directory( d )
/dev/net: directory
drwxr-xr-x 2 root root 60 2009-01-13 20:02 net
/dev/fd: symbolic link to `/proc/self/fd'
lrwxrwxrwx 1 root root 13 2009-06-19 12:06 fd -
> /proc/self/fd
/dev/mem: character special
crw-r----- 1 root kmem 1, 1 2009-06-19 17:35 mem
/dev/loop0: block special
brw-rw---- 1 root disk 7, 0 2009-01-13 20:02 loop0
/dev/log: socket
srw-rw-rw- 1 root root 0 2009-06-19 12:06 log
/dev/initctl: fifo (named pipe)
prw------- 1 root root 0 2009-06-19 12:06
initctl
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / ravikumar reddy .dubba
I have seen many Different Ans but
There are 7 files in Unix
1.Normal files, indicatered by (-)
2.Hidden files, indicatered by (.)
3.BackUp files, indicatered by (~)
4.link files , indicatered by (@)
5.Directory files indicatered by (d)
6.device files
7.executable files indicatered by (*)
dubba.ravikumarreddy@gmail.com
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / nishikant
Everything in Unix system is consider as a file system.
Generally we have 3 types of file system as below:
1) Ordinary file system :
Regular files, semaphore,linked files,block special
files, character special etc...
2) Directory file system:
derectory files like /bin, /use,/home,/tmp, even
if /root etc... that is directory+files.
3) Device file system :
Its purely releated to the device configuration in
UNIX OS.
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / mohan
Only 1. Which is root directory bcoz it is the file where u
enter & also exit.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / allabaksha
Unix recognizes the following types of files:
Regular file
Text or binary data (e.g. an image).
Directory
Contains other files and directories.
Executable file
File with the "execute bit" set. Most commands are
executable files.
Symbolic link
File is a "shortcut" that points to another file.
Device special file
An interface to a piece of hardware, such as a printer. You
don't have to worry about this.
Named pipe
An interface to a network program. You don't have to worry
about this.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / prasad
Unix recognizes the following types of files:
Regular file
Text or binary data (e.g. an image).
Directory
Contains other files and directories.
Executable file
File with the "execute bit" set. Most commands are
executable files.
Symbolic link
File is a "shortcut" that points to another file.
Device special file
An interface to a piece of hardware, such as a printer.
You don't have to worry about this.
Named pipe
An interface to a network program. You don't have to
worry about this.
Is This Answer Correct ? | 3 Yes | 3 No |
7 types files are there.
1. Regular file:(-):contains data in either text format or
binary format
2. Directory file:(d):It contains the name and location of
all files stored on a physical device.
3. FIFO file:(f):2 communicate betn 2 processes running on
same system
4. Block special file:(b):Its a physical device such as a
disk, that reads or write data a block at a time.
5. Sybolic file:(l):its a link or pointer to already
existing file
6. Socket file:(s):Is a special file that is used for
network communication.
7. Character special file:(c):A physical device such as
terminal that reads or write one character at a time.
Ex-
stdin, stdout, stderr
Thanks,
Jagadeeb@gmail.com
Is This Answer Correct ? | 3 Yes | 3 No |
Answer / deepak kumar sngh
there are 4 type of file system:-
UFS:-unix file system
PCFS:-PC file system
HCFS:-High sierra file system
UDF:-Universal Disk Format file system
Is This Answer Correct ? | 0 Yes | 0 No |
What are the dos commands?
what does a process mean?
what is the difference between "cron" command and "at" command?
what is the cmd to display the last exit status in UNIX?
What is the unix command to confirm a remote host is alive or not?
What command is used to replace the existing string with some other?
Describe the usage and functionality of the command rm –r * in unix?
Enlist some filename manipulation commands in unix.
How to check the flavor of UNIX?
which command is used to stop a running process in unix?
What is the behavioural difference between cmp and diff commands?
What is the functionality of a top command?