To make an empty file, use the
$ touch file1 file2 file3
touch command is built for much more than just creating empty files. It can be used to update timestamps. Specify a particular option to modify a certain time attribute.
This command can also be used to update the access date or modification date of a file or directory.
You can access the modification time with a simple
ls -l command.
To make a directory, simply use the
$ mkdir dir1 dir2 dir3
This makes a directory named dir1, dir2 and dir3.
To remove (aka delete) a file, use the
$ rm file1
To remove an entire directory, add the
-r option, which means to delete recursively. You may also use the
rmdir command, but this only works if the directory is empty.
$ rm -r dir1
Deleting without the
-r option results in an error.
Be careful when you delete! There is no undelete command, although some distros implement some sort of recyling bin.
Here are some useful options to use for the
Great work! Now let's turn to more intermediate commands.
Relieve spasms, tight muscles, trigger points and pressure points with the Body Back Buddy! This trigger point massage is designed to help you self-message any area of your body - especially those that are hard to reach. Keeping your muscles relaxes and out of contraction is importan in helping to reduce pain and prevent muscle injury.$ Check price
The Linux Command Line takes you from your very first terminal keystrokes to writing full programs in Bash, the most popular Linux shell. Along the way you'll learn the timeless skills handed down by generations of gray-bearded, mouse-shunning gurus: file navigation, environment configuration, command chaining, pattern matching with regular expressions, and more.$ Check price