partition-perm
来自「实战Linux编程的原代码,希望对学驱动的人能有所帮助」· 代码 · 共 39 行
TXT
39 行
#!/bin/sh# Make sure permissions are preserved when moving from one partition to another.if test "$VERBOSE" = yes; then set -x mv --versionfi. $srcdir/setup. $srcdir/../envvar-check. $srcdir/../lang-defaultif test -z "$other_partition_tmpdir"; then exit 77fipwd=`pwd`dir=p-perm-$$trap "cd $pwd; rm -rf $dir $other_partition_tmpdir" 0 1 2 3 15mkdir $dircd $dir: > filechmod a=rwx fileumask 077mv file $other_partition_tmpdirfail=0test -f file && fail=1test -f $other_partition_tmpdir/file || fail=1# This would have failed with the mv from fileutils-4.0i.set _ `ls -l $other_partition_tmpdir/file`; shift; mode=$1test "$mode" = "-rwxrwxrwx" || fail=1exit $fail
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?