Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- fileName=$1
- trashPath=$HOME/.trash
- logPath=$HOME/trash.log
- if [ $# -ne 1 ]; then
- exit 1
- fi
- if [ -d $trashPath ]; then :
- else
- mkdir $trashPath
- fi
- currentTrashFile=$(date +%s)
- ln $fileName "$trashPath/$currentTrashFile"
- rm $fileName
- if [ -e $logPath ];
- then :
- else
- touch $logPath
- fi
- echo "$PWD/$fileName:$currentTrashFile" >> $logPath
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement