From the course: Linux: System Information and Directory Structure Tools

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Getting information about files

Getting information about files

- [Instructor] Metadata is data that describes other data. Files have associated metadata. Note that a file will contain its own data, for instance, a photo will contain photo information, plus the operating system associates additional data describing the file, as well. This metadata may include the file name, size, permissions, et cetera. The quickest way to get information about a file is by doing a long list of the file using the ls command. Let's view the metadata of a system file using ls. In a terminal, type in ls -l /etc/passwd and hit Enter. A long list gives quite a lot of information, so let's take a look at it. The first column is the file type. In this example, the empty password file has a hyphen, so it is a regular data file. This field can also be a b for a block device, c for a character device, d for a directory, l for symbolic link, n for a network file, p for a FIFO, or pipe, of an s for a socket…

Contents