feat(bash): move functions
This commit is contained in:
parent
badeeba6a9
commit
448afa4574
1 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,17 @@
|
||||||
|
function tp {
|
||||||
|
if [ -d $1 ]
|
||||||
|
then
|
||||||
|
if ! gum confirm "$(basename $1) is directory! Do you really want to delete it?"
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
mv $(realpath $1) $HOME/.local/share/Trash/files/
|
||||||
|
echo -e "[Trash Info]\nPath=$(realpath $1)\nDeletionDate=$(date "+%Y-%m-%dT%H:%M:%S")" > $HOME/.local/share/Trash/info/$(basename $1).trashinfo
|
||||||
|
gum style --bold --border rounded --border-foreground "#F5A9B8" --foreground "#5BCEFA" "$(basename $1) has been thrown in the bin"
|
||||||
|
}
|
||||||
|
|
||||||
function secure_erase {
|
function secure_erase {
|
||||||
dd if=/dev/urandom of=/dev/$1 bs=1M status=progress
|
dd if=/dev/urandom of=/dev/$1 bs=1M status=progress
|
||||||
dd if=/dev/urandom of=/dev/$1 bs=1M status=progress
|
dd if=/dev/urandom of=/dev/$1 bs=1M status=progress
|
Loading…
Reference in a new issue