Differences

This shows you the differences between the selected revisions of the page.

custom_commands 2022-02-08 custom_commands 2024-10-08 (current)
Line 23: Line 23:
==== [[gzip]] Gzip ==== ==== [[gzip]] Gzip ====
 +<code custom-command-remote> 
 +gzip -f "!" 
 +</code>
<code custom-command-remote> <code custom-command-remote>
Line 168: Line 170:
==== Backup a File with Current Date and Time ==== ==== Backup a File with Current Date and Time ====
<code custom-command-remote> <code custom-command-remote>
-cp ! $(echo "!" | sed "s/\..*$//").$(date '+%Y-%m-%d_%H-%M').$(echo ! | awk -F"." '{ print $NF }')+cp ! $(echo "!" | sed "s/\.[^.]*$//").$(date '+%Y-%m-%d_%H-%M').$(echo ! | awk -F"." '{ print $NF }')
</code> </code>
==== Rename a File with Current Date and Time ==== ==== Rename a File with Current Date and Time ====
<code custom-command-remote> <code custom-command-remote>
-mv ! $(echo "!" | sed "s/\..*$//").$(date '+%Y-%m-%d_%H-%M').$(echo ! | awk -F"." '{ print $NF }')+mv ! $(echo "!" | sed "s/\.[^.]*$//").$(date '+%Y-%m-%d_%H-%M').$(echo ! | awk -F"." '{ print $NF }')
</code> </code>
Line 193: Line 195:
  * Connect at least once from an interactive terminal (such as [[&url(putty)|PuTTY SSH client]]) to verify the destination server host key.   * Connect at least once from an interactive terminal (such as [[&url(putty)|PuTTY SSH client]]) to verify the destination server host key.
  * Use for example [[ui_login_authentication#forwarding|Agent forwarding]] to forward your private key to the destination server for authentication.   * Use for example [[ui_login_authentication#forwarding|Agent forwarding]] to forward your private key to the destination server for authentication.
-  * Another less-secure method of authentication is use of ''[[https://sourceforge.net/projects/sshpass/|sshpass]]'' tool (see its [[&amp;man_ref(1,sshpass)|man page]]).+  * Another less-secure method of authentication is use of ''[[https://sourceforge.net/projects/sshpass/|sshpass]]'' tool (see its [[https://www.mankier.com/1/sshpass|man page]]).
===== [[compare]] File Compare ===== ===== [[compare]] File Compare =====

Last modified: by 155.190.53.4