File attributes
The first field displays a file’s attributes: file type and permissions. In other words, this field shows us which type of file we’re looking at, and what its file permissions are. The default lists this information in symbolic mode, in contrast to numeric mode, which you can view with -n
.
File type
-rw-r--r-- 1 root root 386 Feb 16 2023 os-release
The first character here indicates the file type. In the listing above, the -
character indicates a regular file. Lines starting with l
indicate a symbolic link, which is simply a special file that has no content of its own, and just points to another location on the filesystem. You can think of it as a Windows shortcut or a macOS file alias.
Other common file types are d
, indicating a directory, or c
, which indicates that you’re looking at a character file – you’ll mainly find the latter in /dev
, representing hardware input devices such as keyboards. For more on file...