Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
home_server:home_server_setup:other_services:bash [2025-08-16 Sat wk33 18:09] – [list contents] baumkphome_server:home_server_setup:other_services:bash [2025-08-16 Sat wk33 19:41] (current) – [create] baumkp
Line 446: Line 446:
   *''-f'' : for file, this option is used in order to specify the filename of the archive we want to create (in this case archive.tar), The ''f'' option should be just before the file name.   *''-f'' : for file, this option is used in order to specify the filename of the archive we want to create (in this case archive.tar), The ''f'' option should be just before the file name.
  
-If backing up a root directory use the following as an example: ''sudo tar -czvPf /etc'' a better example is ''sudo tar -czvf -C / etc''+If backing up a root directory use the following as an example: ''sudo tar -czvPf filename /etc'' a better example is ''sudo tar -czvf filename -C / etc''
   *''-P'' : for Don't strip leading slashes from file names when creating archives.  This is not recommended as the absolute path will overwrite the information in the root directory, which will often and mostly lead to undesirable outcomes.  This is why the ''tar'' command will usually strip leading absolute path references to root directory, that is paths starting with ''/''.   *''-P'' : for Don't strip leading slashes from file names when creating archives.  This is not recommended as the absolute path will overwrite the information in the root directory, which will often and mostly lead to undesirable outcomes.  This is why the ''tar'' command will usually strip leading absolute path references to root directory, that is paths starting with ''/''.
   *''-C'' : for change to directory.  This changes the directory to ''/'' and then copies the files into the archive with relative paths, that is without the leading ''/''   *''-C'' : for change to directory.  This changes the directory to ''/'' and then copies the files into the archive with relative paths, that is without the leading ''/''