From d365ab5de80b9d35ce02dd9260ec836c3006d413 Mon Sep 17 00:00:00 2001 From: NoahSwinamer Date: Sun, 27 Aug 2023 13:01:58 -0300 Subject: [PATCH 1/2] update --- README.md | 4 +++- trash.sh | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1eba22a..79cb3ae 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ it empty the trash for you -can be interrupted by pressing ctrl + c +can be exit by pressing ctrl + z + +https://github.com/NoahSwinamer/trash-script-/issues diff --git a/trash.sh b/trash.sh index a020234..e0989a7 100644 --- a/trash.sh +++ b/trash.sh @@ -1,10 +1,41 @@ #!/bin/bash +echo to start press ctrl+c +#to start the script press ctrl+c +exec 3>&1 4>&2 +trap 'exec 2>&4 1>&3' 0 1 2 3 4 5 +exec 1>log.out 2>&1 + +lsb_release -a +#For Loging Distributor ID and Description and Release and Codename +uname -mrs +#For Loging Kernel name and Kernel version number and Machine hardware name +echo /.local/share/Trash/files/ +#The Directory to Trash Files +ls -l ~/.local/share/Trash/files/ +#For Loging Number of Trash Files + +echo /.local/share/Trash/info/ +#The Directory to Trash info +ls -l ~/.local/share/Trash/info/ +#For Loging Number of Trash info Files + + + for (( ; ; )) do sleep 40 +# is Sleep 40 Second echo $(rm -rf ~/.local/share/Trash/files/*) +echo /.local/share/Trash/files/ +ls -l ~/.local/share/Trash/files/ + echo $(rm -rf ~/.local/share/Trash/info/*) -done +echo /.local/share/Trash/info/ +ls -l ~/.local/share/Trash/files/ +echo to exit ctrl+z +#to exit the script press ctrl+z + +done From 6d2ed74e754921c563e4da3e52c91e8f7b858cf4 Mon Sep 17 00:00:00 2001 From: NoahSwinamer Date: Sun, 27 Aug 2023 13:04:11 -0300 Subject: [PATCH 2/2] Update and rename trash.txt to j --- j | 4 ++++ trash.txt | 7 ------- 2 files changed, 4 insertions(+), 7 deletions(-) create mode 100644 j delete mode 100644 trash.txt diff --git a/j b/j new file mode 100644 index 0000000..fd40910 --- /dev/null +++ b/j @@ -0,0 +1,4 @@ + + + + diff --git a/trash.txt b/trash.txt deleted file mode 100644 index a7df019..0000000 --- a/trash.txt +++ /dev/null @@ -1,7 +0,0 @@ -it empty the trash for you - -can be interrupted by pressing ctrl + c - - - -