Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
home_server:home_server_setup:other_services:bash [2025-08-16 Sat wk33 18:07] – [list contents] baumkphome_server:home_server_setup:other_services:bash [2025-11-22 Sat wk47 11:58] (current) – [BASH History Customisation and Use] baumkp
Line 364: Line 364:
  
 Links: Links:
 +  *[[https://mywiki.wooledge.org/BashGuide|Bashguide]]
 +  *[[https://style.ysap.sh/|https://style.ysap.sh/]]
 +    *[[https://ysap.sh/|YSAP You suck at Programming]]
   * [[https://www.digitalocean.com/community/tutorials/how-to-use-bash-history-commands-and-expansions-on-a-linux-vps|How To Use Bash History Commands and Expansions on a Linux VPS]]   * [[https://www.digitalocean.com/community/tutorials/how-to-use-bash-history-commands-and-expansions-on-a-linux-vps|How To Use Bash History Commands and Expansions on a Linux VPS]]
   * [[https://opensource.com/article/20/6/bash-history-control|Make Bash history more useful with these tips]]   * [[https://opensource.com/article/20/6/bash-history-control|Make Bash history more useful with these tips]]
Line 446: Line 449:
   *''-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 ''/''
Line 456: Line 459:
 ''tar -tvf 'archive filename''' ''tar -tvf 'archive filename'''
   *''t'' will list the contents of the archive.   *''t'' will list the contents of the archive.
 +  *''v'' will list all the file parameters, without just the file path/name only.
 =====ps process===== =====ps process=====
 ''ps aux'' to see current process ''ps aux'' to see current process