O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

1.1. Files

When you create a file the system stores all the information you could ever want to know about it, including:

  • The location of the file;

  • File type;

  • File size;

  • Who owns it and can access it;

  • The inode;

  • Time last modified; and

  • The permission bits of the file.

Let’s look at a typical file listing, using the ls -l command:

						$ ls -l 
total 4232 
-rwxr-xr-x   1 root   root     3756  Oct 14 04:44 dmesg 
-r-xr-xr-x   1 root   root     12708 Oct  3 05:40 ps 
-rwxr-xr-x   1 root   root     5388  Aug  5  1998 pwd 
.... 

If we go through the output of the first two lines a step at a time, we can break down the information ls -l gives us.

total 4232 This field tells us how much space the files have taken up in the directory.
-rwxr-xr-x This is the permission bits on the file. If you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required