Skip to content

Instantly share code, notes, and snippets.

@Z1xus
Created November 20, 2023 20:03
Show Gist options
  • Select an option

  • Save Z1xus/993ce495dba1ed56212c4b1ec6a5bdf5 to your computer and use it in GitHub Desktop.

Select an option

Save Z1xus/993ce495dba1ed56212c4b1ec6a5bdf5 to your computer and use it in GitHub Desktop.

Revisions

  1. Z1xus created this gist Nov 20, 2023.
    14 changes: 14 additions & 0 deletions remove_june.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #!/bin/bash

    read -p "Are you sure you want to continue? (y/N) " -n 1 -r
    echo

    if [[ $REPLY =~ ^[Yy]$ ]]; then
    echo "Removing 'june'..."

    find / \( -path /proc -o -path /sys -o -path /dev -o -path /run -o -path /var/run -o -path /tmp -o -path /snap -o -path /var/lib/snapd \) -prune -o -type f -name 'june' -exec rm -f {} +

    echo "Removal complete."
    else
    echo "Operation aborted by the user."
    fi