In this section we will briefly explore how to copy, remove, and update files.
Several books have been written about filesystem management, and so this will serve as just a brief overview. If you have a Linux machine available you can try out these commands. We will be doing everything in the /tmp
filesystem, so you don't have to worry about messing anything up on your system.
The following is the method to create some files and directories:
Go to the
/tmp
directory:cd /tmp
Make a test directory:
mkdir lbooktest3
Go to the directory:
cd lbooktest3
Let's create some files:
ls > f1; ls > f2; ls > f3
Also, create some directories:
mkdir dir1 dir2 dir3
The syntax for copy is
cp source-file destination-file
, so now runcp f1 f5
. This will create filef5
which is a copy of filef1
.You can copy to a directory:
cp f1 dir1
The above is a relative path, because it starts from the current directory. To use an absolute...