Managing Files#

Command Action
ls List the contents of a directory
file Determine the file type
less Navigate the contents of a file
cat View the contents of a file
ln -s Make symbolic links

File Types#

A file can contain any type of data. For example, it could be plain text, a picture, a video or many more. The file command tries to guess what type of data is in the file. It’s not perfect because it’s not always possible to tell (e.g. when a file called picture.jpg is empty). Plain text files can be viewed on the command line with cat and less.