请问这是怎么回事阿?关于rename
发表于 : 2010-09-30 7:57
我想将文件夹里(里面还有子文件夹)所有.jad文件后缀改为.java文件
但是下面的脚本都出现错误,请问怎么回事阿?
nanger@nanger-laptop:~/Desktop/try/b$ find -type f -name '*.jad' -exec rename 'jad' 'java' {} \;
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
nanger@nanger-laptop:~/Desktop/try/b$ rename jad java *.jad
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
另外我还想删除文件夹里(包括子文件夹)所有.class文件,但是如果文件名中有$就不删除,如abc.class 就删除 abc1$.class就不删除,如何写脚步做到阿?谢谢
但是下面的脚本都出现错误,请问怎么回事阿?
nanger@nanger-laptop:~/Desktop/try/b$ find -type f -name '*.jad' -exec rename 'jad' 'java' {} \;
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
nanger@nanger-laptop:~/Desktop/try/b$ rename jad java *.jad
Bareword "jad" not allowed while "strict subs" in use at (eval 1) line 1.
另外我还想删除文件夹里(包括子文件夹)所有.class文件,但是如果文件名中有$就不删除,如abc.class 就删除 abc1$.class就不删除,如何写脚步做到阿?谢谢