dangling-symlink

来自「实战Linux编程的原代码,希望对学驱动的人能有所帮助」· 代码 · 共 40 行

TXT
40
字号
#!/bin/sh# Make sure touch can create a file through a dangling symlink.# This was broken in the 4.0[e-i] test releases.if test "$VERBOSE" = yes; then  set -x  touch --versionfirm -f touch-target t-symlinkln -s touch-target t-symlinkfail=0# This used to infloop.touch t-symlink || fail=1test -f touch-target || fail=1rm -f touch-target t-symlinkif test $fail = 1; then  case $host_triplet in    *linux-gnu*)      case "`uname -r`" in        2.3.9[0-9]*)	  cat 1>&2 <<EOF====================================================$0: WARNING!!!This version of the Linux kernel causes touch to failwhen operating on dangling symlinks.====================================================EOF	  exit 77	  ;;      esac      ;;  esacfiexit $fail

⌨️ 快捷键说明

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