Question: A shell script developer knows that the date + % A command gives the current local weekday name ( Sunday , Monday, Tuesday, . .

A shell script developer knows that the date +%A command gives the current local weekday name (Sunday, Monday, Tuesday, ...).
Which of the following commands will copy the authentication log file, /var/log/auth.log, to a new file with a filename that includes the current local weekday name?
answer
cp /var/log/auth.log ~/auth$(date +%A).log
cp /var/log/auth.log ~/auth${date +%A}.log
tee /var/log/auth.log > date +%A -log
xargs /var/log/auth.log ~/auth$(date +%A).log

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!