I want to copy some files from root directory (/var/log/) to home directory(home/test/copyfromlogs/) and after that i want to remove those files from root directory.
The files I want to copy are situated under /var/log/. The root directory is filling up so I want to remove the following files from there. .
btmp-20200401 >> 894M ; secure-20200322 >> 187M ; secure-20200329 >> 235M ; secure-20200405 >> 180M ; secure-20200412 >> 119M
I have created directory under home to have a backup of those file so that i need them just incase. The full path of the new directory is '/home/test/copyoflogfiles/'
I am new learner. I want to ask
If the following command is correct if I want to copy
btmp-20200401from/var/logto/home/test/copyoflogfiles/. If not what will be the correct commandcp /var/log/btmp-20200401 /home/test/copyoflogfiles/What will be my current directory when I will perform the copy command? Suppose I am inside
/home/test/copyoflogfiles/. In that case will the command be different?Can you please tell me what is the command for deleting single file from the directory . I want to remove the file
btmp-20200401from/var/log/after copying that file
Kind regards