📄 mv-special-1
字号:
#! /bin/shif test "$VERBOSE" = yes; then set -x mv --versionfipwd=`pwd`tmp=mv-spec.$$trap 'status=$?; cd $pwd; exec 1>&2; rm -rf $tmp $other_partition_tmpdir && exit $status' 0trap '(exit $?); exit' 1 2 13 15. $srcdir/setup. $srcdir/../envvar-check# Make sure we get English translations.. $srcdir/../lang-defaultif test -z "$other_partition_tmpdir"; then (exit 77); exitfinull=mv-nulldir=mv-dirframework_failure=0mkdir $tmp || framework_failure=1cd $tmp || framework_failure=1rm -f $null || framework_failure=1mknod $null p || framework_failure=1mkdir -p $dir/a/b/c $dir/d/e/f || framework_failure=1touch $dir/a/b/c/file1 $dir/d/e/f/file2 || framework_failure=1if test $framework_failure = 1; then echo '********************************************' echo 'NOTICE: unable to create test prerequisites' echo '********************************************' # exit 77 here to indicate that we couldn't run the test. # At least running on SunOS 4.1.4, using a directory NFS mounted # from an OpenBSD system, the above mknod fails. (exit 77); exitfifail=0mv --verbose $null $dir $other_partition_tmpdir > out || fail=1# Make sure the files are gone.test -f $null && fail=1test -d $dir && fail=1# Make sure they were moved.# Since `test -e' is not portable, use `ls'.ls $other_partition_tmpdir/$null > /dev/null || fail=1test -d $other_partition_tmpdir/$dir/a/b/c || fail=1sed "s,$other_partition_tmpdir,XXX," out | sort > out2cat <<EOF | sort > exp\`$null' -> \`XXX/$null'removed \`$null'\`$dir' -> \`XXX/$dir'\`$dir/a' -> \`XXX/$dir/a'\`$dir/a/b' -> \`XXX/$dir/a/b'\`$dir/a/b/c' -> \`XXX/$dir/a/b/c'\`$dir/a/b/c/file1' -> \`XXX/$dir/a/b/c/file1'\`$dir/d' -> \`XXX/$dir/d'\`$dir/d/e' -> \`XXX/$dir/d/e'\`$dir/d/e/f' -> \`XXX/$dir/d/e/f'\`$dir/d/e/f/file2' -> \`XXX/$dir/d/e/f/file2'removed directory: \`$dir'removed \`$dir/a/b/c/file1'removed \`$dir/d/e/f/file2'removed directory: \`$dir/a'removed directory: \`$dir/a/b'removed directory: \`$dir/a/b/c'removed directory: \`$dir/d'removed directory: \`$dir/d/e'removed directory: \`$dir/d/e/f'EOFcmp out2 exp || fail=1# cd $other_partition_tmpdir# ls -l -A -R $other_partition_tmpdir(exit $fail); exit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -