Much of what you’ll need to do on the command line involves working with files in some way—creating, deleting, copying, renaming, and moving them. This chapter covers the essentials of interacting with files and directories.
I want to mention a curious command called
touch that serves two interesting functions:
touchcreates an empty file.
touchupdates its modification date to the current date and time, marking it as modified.
Try entering the following command:
ls -l to list the contents of your current directory. You’ll see
file1 in the list. This file that you’ve just created is completely empty. ...