Create file using tar and ls commands
Hi All
I have a file aa.txt
I want to tar it. I'm using
tar -cvf aa.tar aa.txt
There's only one .txt file in my folder. I want to ls my folder, get the file's name and create a tar with its name
ls *.txt
aa.txt
And I want not to give the tar file's name directly, but use the result of ls as tar file's name. It's name will be aa.txt.tar
Thank you very much
|