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

📄 fail-diag

📁 Linux下文件工具。
💻
字号:
#!/bin/sh# make sure touch gives reasonable diagnosticsif test "$VERBOSE" = yes; then  set -x  touch --versionfi. $srcdir/../envvar-check. $srcdir/../lang-defaultPRIV_CHECK_ARG=require-non-root . $srcdir/../priv-checkpwd=`pwd`tmp=fail-diag.$$trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0trap '(exit $?); exit' 1 2 13 15framework_failure=0mkdir $tmp || framework_failure=1cd $tmp || framework_failure=1if test $framework_failure = 1; then  echo 'failure in testing framework' 1>&2  (exit 1); exitfifail=0# Before fileutils-4.1, we'd get the following misleading# diagnostic instead of `Permission denied'.# touch: creating `/': Is a directorytouch / > out 2>&1 && fail=1touch /no/such-dir >> out 2>&1 && fail=1# On SunOS4, EPERM is `Not owner'.# On some *BSD systems it's `Operation not permitted'.for msg in 'Not owner' 'Operation not permitted' 'Permission denied'; do  cat > exp <<EOF  touch: setting times of \`/': $msg  touch: creating \`/no/such-dir': No such file or directoryEOF  cmp out exp > /dev/null 2>&1 && breakdonetest $fail = 1 && diff out exp 2> /dev/null(exit $fail); exit

⌨️ 快捷键说明

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