⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wipedir.sh

📁 Shall高级编程
💻 SH
字号:
#!/bin/bashE_WRONG_DIRECTORY=73clear # Clear screen.TargetDirectory=/home/bozo/projects/GreatAmericanNovelcd $TargetDirectoryecho "Deleting stale files in $TargetDirectory."if [ "$PWD" != "$TargetDirectory" ]then    # Keep from wiping out wrong directory by accident.  echo "Wrong directory!"  echo "In $PWD, rather than $TargetDirectory!"  echo "Bailing out!"  exit $E_WRONG_DIRECTORYfi  rm -rf *rm .[A-Za-z0-9]*    # Delete dotfiles.# rm -f .[^.]* ..?*   to remove filenames beginning with multiple dots.# (shopt -s dotglob; rm -f *)   will also work.# Thanks, S.C. for pointing this out.# Filenames may contain all characters in the 0 - 255 range, except "/".# Deleting files beginning with weird characters is left as an exercise.# Various other operations here, as necessary.echoecho "Done."echo "Old files deleted in $TargetDirectory."echoexit 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -