我正在尝试编写一个 shred 脚本以将删除的文件输出到文本文件,但我认为我的输出有问题?我还考虑在脚本中添加一个电子邮件部分,以便在删除所有文件后发送电子邮件确认,但首先需要让输出工作到文本文件中。
谢谢
#!/bin/bash
# Use on remote server
LOCATION="/home/user/Test"
TIMES=-n38
cd $LOCATION
# Delete all files in location 30 times
echo "Deleting all delete located at $LOCATION "
nohup find $LOCATION -exec shred $TIMES -u '{}' \; & >> /home/user/output.txt
echo "All data at $LOCATION has been shredded $TIMES times"
# Delete the partition
#nohup shred -n 30 -vz /dev/sdb1 &