Xiaopan / TinyPaw / TCL - non-gvfs FM trash cleaner

Discussion in 'Scripts & Commands' started by r1sen, 3 May 2018.

  1. r1sen

    r1sen Well-Known Member
    Dev Team VIP

    Joined:
    22 Nov 2017
    Messages:
    187
    Likes Received:
    23
    Probably way late on this but as I play around with things on TCL or TInyPaw - mostly an endless list of *.tar.gz source files I get tired of navigating to /sda1 or /sdb1 .Trash-0 and doing the whole "rm -R files && rm -R info && mkdir files && mkdir info" to clear my built up junk. And that tends to pile up fast - so if anyone has any use for just about the simplest bash script to purge that mounted hidden .Trash folder then here are two.

    1.) One is called "clear_trash_sda" for if you've mounted in a VM.
    "
    #!/bin/sh
    sudo su &&
    cd /mnt/sda1/.Trash-0/ &&
    rm -R files && rm -R info &&
    mkdir files && mkdir info

    "

    2.) The other is called "clear_trash_sdb" for if you've mounted physically.

    "
    #!/bin/sh
    sudo su &&
    cd /mnt/sdb1/.Trash-0/ &&
    rm -R files && rm -R info &&
    mkdir files && mkdir info

    "

    3.) Both are for either sda1 or sdb1.

    4.) Simply open your terminal in the directory you saved your script and enter:
    - sudo bash ./clear_trash_sda.sh

    or

    - sudo bash ./clear_trash_sdb.sh

    5.) Also, you can goto the folder you saved your script in and select your file and right click and select "execute / execute in terminal" as well.

    ***
    Probably posted a million times over, either way - GVFS can take up a lot of extra space if to be compiled in libfm/pcmanfm.
    ***
     

    Attached Files:

    #1 r1sen, 3 May 2018
    Last edited: 3 May 2018
Loading...
  • About Us

    We are a community mixed with professionals and beginners with an interest in wireless security, auditing and pentesting. Feel free to check out and upload resources.


    You can also find us on: Twitter and Facebook

  • Donate to Us

    Did you find our forums useful? Feel free to donate Bitcoin to us using the form below. Those who donate the equivlent of $10 USD or more will be upgraded to VIP membership. Don't have Bitcoin? Use your credit card to GO VIP here. Don't want to fork out some coin? There are other ways to GO VIP. Bitcoin: 1LMTGSoTyJWXuy2mQkHfgMzD7ez74x1Z8K