I’m currently doing an on online course and I’ve got an assignment to backup my home directory to /tmp
here’s he question
What would be a way to back-up all your files and subdirectories found in your login directory and put them into a tarball file out in /tmp called backup.tar ?
the solution according to the courseware is…
tar -cvf /tmp/backup.tar "
This doesn’t work all I get following that command is an > _ at the commmand prompt so clearly I’m not implementing it properly
I’ve no idea what the " at the end signify but if I remove them I get this output
graeme@Linux1 ~ $ sudo tar -cvf /tmp/backup.tar
[sudo] password for graeme:
tar: Cowardly refusing to create an empty archive
Try 'tar --help' or 'tar --usage' for more information.
graeme@Linux1 ~ $
I’ve tried other variations too numerous to mention but I can’t get anything to work, so can any of you commandline gurus give me a clue what I’m doing wrong and why the solution didn’t work
then everything is done as a relative path from there … so there’s no need for the leading / in the path
there’s no need to do this, it just supresses the “Removing leading `/’ from member names” message you get without it.
think of it like this…
if you’re already in / there’s no need to have a full path such as
/home/graeme
instead you can just specify a path relative to your current directory, such as
home/graeme
which removed the need for the leading / it was informing you it was removing.