I started getting "Not a recognized flag:" error for simply running "ls" command without any flags, In AIX. Same problem is with "rm" command.
在AIX中,我开始得到“不被识别的标志:”在没有任何标志的情况下运行“ls”命令的错误。同样的问题是“rm”命令。
The strange thing is that it used to work before.
奇怪的是,以前它曾经工作过。
I saw several questions about getting this error when using commands with flags that are not supported by AIX. But here, I am running without any flags.
在使用带有AIX不支持的标志的命令时,我看到了一些关于获取这个错误的问题。但在这里,我没有任何旗帜。
Here is an example print that I get:
这是我得到的一个例子:
ls
ls: Not a recognized flag: -
ls: Not a recognized flag: =
ls: Not a recognized flag: y
Usage: ls [-1ACFHLNRSabcdefgiklmnopqrstuxEUX] [File...]
Thank you!
谢谢你!
1 个解决方案
#1
1
What shellter said (in essence): You can do
谢尔特说(本质上):你能做到!
type ls
and it should say:
它应该说:
ls is a tracked alias for /usr/bin/ls
My guess is you have a file named ls that is an executable in your current directory. Or, you could have an alias or function within the shell.
我的猜测是,您有一个名为ls的文件,它是当前目录中的可执行文件。或者,可以在shell中有一个别名或函数。
You can also give a full path to avoid the issue:
你也可以给出一个完整的路径来避免这个问题:
/usr/bin/ls
and that should avoid aliases, functions, and rogue executables named ls.
这样就可以避免别名、函数和恶意的可执行文件。
#1
1
What shellter said (in essence): You can do
谢尔特说(本质上):你能做到!
type ls
and it should say:
它应该说:
ls is a tracked alias for /usr/bin/ls
My guess is you have a file named ls that is an executable in your current directory. Or, you could have an alias or function within the shell.
我的猜测是,您有一个名为ls的文件,它是当前目录中的可执行文件。或者,可以在shell中有一个别名或函数。
You can also give a full path to avoid the issue:
你也可以给出一个完整的路径来避免这个问题:
/usr/bin/ls
and that should avoid aliases, functions, and rogue executables named ls.
这样就可以避免别名、函数和恶意的可执行文件。