When we copy a file we need to be able to read the source file and write to the destination directory
cp /etc/ntp.conf /home/andrew
So in this case we need to be able to read the ntp.conf and write to the andrew directory.
To rename a file we use the command mv. If we do not change the directory we are essentially renaming the file but moving to another directory will move the file to that directory. Here we rename the file with mv:
mv ntp.conf ntp.txt
Now we move it:
mv ntp.txt ../dir2/
Take a look at the video and practice on your systems.
0 comments:
Post a Comment