File Manipulation

Let’s explore other ways of manipulating files besides reading and writing.

Besides reading and writing files, we can also manipulate them as we would directly from a command line or a file manager.

File test operators

The file test operators, collectively called the -X operators, examine file and directory attributes. To test that a file exists, try this:

Get hands-on with 1200+ tech skills courses.