rm with wildcards向我展示了taskset帮助输出

时间:2015-04-16 19:10:38

标签: linux unix wildcard rm

我正在尝试使用Unix命令rm和通配符*删除一堆文件夹。令人困惑的是,shell不是删除我的文件夹,而是为我显示taskset命令的帮助输出。谁能解释一下呢?

(master)dbliss@nx1[dist_exp]> rm -r 8*/8*_task_results
taskset (util-linux-ng 2.17.2)
usage: taskset [options] [mask | cpu-list] [pid | cmd [args...]]
set or get the affinity of a process

  -p, --pid                  operate on existing given pid
  -c, --cpu-list             display and specify cpus in list format
  -h, --help                 display this help
  -V, --version              output version information

The default behavior is to run a new command:
  taskset 03 sshd -b 1024
You can retrieve the mask of an existing task:
  taskset -p 700
Or set it:
  taskset -p 03 700
List format uses a comma-separated list instead of a mask:
  taskset -pc 0,3,7-11 700
Ranges in list format can take a stride argument:
  e.g. 0-31:2 is equivalent to mask 0x55555555

如果我在没有rm标志的情况下调用-r(但使用wilcards),也会发生同样的事情。另一方面,用rm替换ls可以按预期工作。

按照@ Biffen关于set -x

的建议后,这是我的输出
(master)dbliss@nx4[dist_exp]> rm -r 8*/8*_task_results
+ taskset -p 1 nice -n19 ionice -t -c3 rm -r 8103/8103_task_results 8131/8131_task_results 8132/8132_task_results 8133/8133_task_results 8141/8141_task_results 8142/8142_task_results 8143/8143_task_results 8161/8161_task_results 8162/8162_task_results 8163/8163_task_results 8171/8171_task_results 8172/8172_task_results 8173/8173_task_results 8181/8181_task_results 8182/8182_task_results 8183/8183_task_results 8191/8191_task_results 8192/8192_task_results 8193/8193_task_results 8261/8261_task_results 8262/8262_task_results 8263/8263_task_results 8341/8341_task_results 8342/8342_task_results 8343/8343_task_results 8361/8361_task_results 8362/8362_task_results 8363/8363_task_results 8381/8381_task_results 8382/8382_task_results 8383/8383_task_results 8391/8391_task_results 8392/8392_task_results 8393/8393_task_results 8401/8401_task_results 8402/8402_task_results 8403/8403_task_results 8431/8431_task_results 8432/8432_task_results 8433/8433_task_results 8451/8451_task_results 8452/8452_task_results 8453/8453_task_results 8461/8461_task_results 8462/8462_task_results 8463/8463_task_results
taskset (util-linux-ng 2.17.2)
usage: taskset [options] [mask | cpu-list] [pid | cmd [args...]]
set or get the affinity of a process

  -p, --pid                  operate on existing given pid
  -c, --cpu-list             display and specify cpus in list format
  -h, --help                 display this help
  -V, --version              output version information
. . . 

值得注意的是,rm对我有用:

dbliss@nx4[~]> touch banana
dbliss@nx4[~]> ls banana
banana
dbliss@nx4[~]> rm banana
dbliss@nx4[~]> ls banana
ls: cannot access banana: No such file or directory

1 个答案:

答案 0 :(得分:1)

您的管理员(或某人)已将rm命令别名。使用\rm暂时绕过别名,或unalias rm然后疯狂。