Issue
I am using a command terminal inside a VirtualBox CentOS 7 linux system. I am attempting to create a tar file into a seperate directory that contains all the files in my current directory that start with the letter "a".
I have tried tar -cvf fileName.tar /newDirectory ls a*
but I think that I'm doing something wrong. I assume this should only take one line of the command terminal to execute, does anybody know the right way to do it?
Solution
The first parameter is the tar file name (full path) and the second is the files you want take. Try it:
tar -cvf newDirectory/fileName.tar a*
Answered By - taiz