Skip to Content
Learn Linux Shell Scripting - Fundamentals of Bash 4.4
book

Learn Linux Shell Scripting - Fundamentals of Bash 4.4

by Sebastiaan Tammer
December 2018
Beginner
452 pages
12h 17m
English
Packt Publishing
Content preview from Learn Linux Shell Scripting - Fundamentals of Bash 4.4

File descriptors

You might be tired of hearing it, but it is still no less true: in Linux, everything is a file. We've seen that a file is a file, a directory is a file, even hard disks are files; but now, we'll take this one step further: your keyboard, which you use for input, is also a file!

Complementary to that, your Terminal, which commands use as output, is, guess what: a file.

You can find these files, as with most special files, within your Linux filesystem tree. Let's check our virtual machine:

reader@ubuntu:~$ cd /dev/fd/reader@ubuntu:/dev/fd$ ls -ltotal 0lrwx------ 1 reader reader 64 Nov  5 18:54 0 -> /dev/pts/0lrwx------ 1 reader reader 64 Nov  5 18:54 1 -> /dev/pts/0lrwx------ 1 reader reader 64 Nov  5 18:54 2 -> /dev/pts/0lrwx------ ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Bash Scripting Fundamentals

Bash Scripting Fundamentals

Sander van Vugt

Publisher Resources

ISBN: 9781788995597Supplemental Content