On 2010/11/06 18:49, Bahador NazariFard wrote: > > Thank you for your very soon reply > Excuse me you are right. > I had installed gnuls-4.1p2 (colorized GNU 'ls') and I had defined > alias ls='gls --color=tty'. > unfortunately it seems gls -n does not work properly and it was the > reason of that problem.
The system scripts assume a clean shell environment, we can't really protect against an unclean shell - somebody may have made an alias for ifconfig, chmod, chown, or even /bin/ls (yes this is possible!). I think you're probably using '. /etc/netstart ...' which runs the script in the current shell; instead use 'sh /etc/netstart ...' which will solve this (and other possible problems). > However I do not agree with you that ls -nl is pointless and ambiguous. > If we read ls manual, we can find these lines about -n option. > -n List in long format as in -l, but retain user and group IDs in > a > numeric format. The output of -gn and -ng is identical: a > long > listing with numerical group ID, and no numerical user > ID. The > output of -ln and -nl is identical: a long listing with > numerical > group and user ID. > therefore there is no problem and we can use ls -nl . Ah, then I agree that it's not ambiguous, though I still think it's pointless to use -nl when -n does the same.