Differences
This shows you the differences between the selected revisions of the page.
| custom_commands 2020-02-07 | custom_commands 2025-02-14 (current) | ||
| Line 7: | Line 7: | ||
| ==== Extensions ==== | ==== Extensions ==== | ||
| - | * [[library_example_zip_and_upload|Pack files to ZIP archive and upload it]] | + | * [[library_example_zip_and_upload|*]] |
| - | * [[extension_archive_and_download|Archive remote files to ZIP archive, download it, and optionally extract it]] | + | * [[extension_archive_and_download|*]] |
| ==== Tar/Gzip ==== | ==== Tar/Gzip ==== | ||
| Line 36: | Line 36: | ||
| <code custom-command-remote> | <code custom-command-remote> | ||
| - | unzip "!" | + | unzip -o "!" |
| </code> | </code> | ||
| Line 42: | Line 42: | ||
| <code custom-command-remote> | <code custom-command-remote> | ||
| - | unzip -d "!?&Extract to directory:?.!" "!" | + | unzip -o -d "!?&Extract to directory:?.!" "!" |
| </code> | </code> | ||
| Line 51: | Line 51: | ||
| </code> | </code> | ||
| - | ==== Rar ==== | + | ==== [[rar]] Rar ==== |
| <code custom-command-remote> | <code custom-command-remote> | ||
| Line 71: | Line 71: | ||
| </code> | </code> | ||
| - | ===== [[delete_background]] Deleting on Background ===== | + | Both above solutions require a shell access. If you do not have it, use the following solution. |
| + | |||
| + | ===== [[delete_background]] Deleting in Background ===== | ||
| Use the following command to delete a large directory structure in a separate process: | Use the following command to delete a large directory structure in a separate process: | ||
| Line 100: | Line 102: | ||
| chown -R "!?New owner:?!":"!?New group:?!" !& | chown -R "!?New owner:?!":"!?New group:?!" !& | ||
| </code> | </code> | ||
| + | |||
| + | ===== [[time]] Changing Modification Date/Time ===== | ||
| + | |||
| + | <code custom-command-remote> | ||
| + | touch -d "!?Date:!" !& | ||
| + | </code> | ||
| + | |||
| + | ===== [[chmod]] Recursively Changing Permissions of Files or Folders only ===== | ||
| + | For changing directory permissions: | ||
| + | <code custom-command-remote> | ||
| + | find ! -type d -exec chmod !?&Permissions:?755! {} \; | ||
| + | </code> | ||
| + | For changing file permissions: | ||
| + | <code custom-command-remote> | ||
| + | find ! -type f -exec chmod !?&Permissions:?644! {} \; | ||
| + | </code> | ||
| + | Check custom command options //Remote command// and //Apply to directories//. | ||
| ===== Templates ===== | ===== Templates ===== | ||
| Line 151: | 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 176: | 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 [[&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 ===== | ||
| + | |||
| + | Note that WinMerge and other major diff tools are supported by official [[extension_compare_files|*]]. The following is just an example how to use other diff tools. | ||
| ==== WinMerge ==== | ==== WinMerge ==== | ||