Skip to content

Instantly share code, notes, and snippets.

@magefast
Last active February 5, 2025 20:10
Show Gist options
  • Save magefast/33fbedad9d8685d7e204ef2ee13456b8 to your computer and use it in GitHub Desktop.
Save magefast/33fbedad9d8685d7e204ef2ee13456b8 to your computer and use it in GitHub Desktop.

Revisions

  1. magefast revised this gist Feb 5, 2025. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions tips.sh
    Original file line number Diff line number Diff line change
    @@ -17,3 +17,7 @@ du -sh /var/www/html/

    #zip exclude dir
    zip -r mya.zip media/ -x media/catalog/product/cache/**\* media/test/**\*


    #ftp download file
    sudo wget ftp://login:password@host/file_path.sql
  2. magefast revised this gist Feb 29, 2024. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions tips.sh
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,8 @@ ls -1 | wc -l
    find . -maxdepth 1 -type d | while read -r dir
    do printf "%s:\t" "$dir"; find "$dir" -type f | wc -l; done

    # find biggest folders
    du -k /home | sort -n | tail -10

    #copy files to remote server
    scp -r /var/www/html/pub/media/ [email protected]:/var/www/test/
  3. magefast revised this gist Oct 30, 2023. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion tips.sh
    Original file line number Diff line number Diff line change
    @@ -11,4 +11,7 @@ scp -r /var/www/html/pub/media/ [email protected]:/var/www/test/


    #check size folder
    du -sh /var/www/html/
    du -sh /var/www/html/

    #zip exclude dir
    zip -r mya.zip media/ -x media/catalog/product/cache/**\* media/test/**\*
  4. magefast revised this gist Oct 30, 2023. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion tips.sh
    Original file line number Diff line number Diff line change
    @@ -7,4 +7,8 @@ do printf "%s:\t" "$dir"; find "$dir" -type f | wc -l; done


    #copy files to remote server
    scp -r /var/www/html/pub/media/ [email protected]:/var/www/test/
    scp -r /var/www/html/pub/media/ [email protected]:/var/www/test/


    #check size folder
    du -sh /var/www/html/
  5. magefast revised this gist Oct 30, 2023. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions tips.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,10 @@
    #count files
    ls -1 | wc -l

    #
    find . -maxdepth 1 -type d | while read -r dir
    do printf "%s:\t" "$dir"; find "$dir" -type f | wc -l; done


    #copy files to remote server
    scp -r /var/www/html/pub/media/ [email protected]:/var/www/test/
  6. magefast revised this gist Oct 30, 2023. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions tips.sh
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,5 @@
    #count files
    ls -1 | wc -l

    #copy files to remote server
    scp -r /var/www/html/pub/media/ [email protected]:/var/www/test/
  7. magefast created this gist Oct 30, 2023.
    2 changes: 2 additions & 0 deletions tips.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    #count files
    ls -1 | wc -l