tags:

views:

619

answers:

2

Hi

I need help to understand the following command.

tar -cvf /dev/nst0 /home/user1 >> file1.log

Thanks!

+1  A: 

Read the man page :

-c stands for create
-v is for verbose
-f specify the archive name

And tar -cvf is equivalent to tar -c -v -f, so what this is doing is creating an archive of /home/user1 into /dev/nst0. The >> file1.log is redirecting and appending the standard output to file1.log. tar -cvf archive_name [files] > file.log would erase any existing content in file1.log

Have a look here for an explanation on I/O redirection

shodanex
+1  A: 

In addition to shodanex's answer: this creates a tar archive, written to /dev/nst0 (a tape drive?) from /home/user1 and appends the output (remember verbose -v) to file1.log

Vincent De Baere