Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
We have brought a Fedora 8 dedicated server from godaddy. On that "ls -lh" commad is not working. The following are the output of ls -lh
# ls -lh
ls: invalid option -- h
Try `ls --help' for more information.
In man page of ls and ls in "ls-- help " there is the option -h. But not working that.
We haven't done any modification on the machine. Anybody know how I get the proper output of "ls -lh"
Thanking you,
Nikesh
Click here to see the post LQ members have rated as the most helpful post in this thread.
I am using Bash shell.
Also i checked the aliases of the server. below is the alias output.
# alias
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias vi='vim'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
What effect would the bash version have on how the /bin/ls executable behaves? AIUI, once bash has forked itself and "exec"ed the executable it no longer has any influence on what the executable does ... ?
I have no clue how the bash version might be related to the behavior of ls-----the main point is that the OP's system is out of date. A complete system update (eg clean install of the current Fedora) will likely solve MANY issues.
Is "ls" one of the builtins? i.e. are "ls" and "/bin/ls" actually 2 different commands?
Perhaps the -h/--human-readable option was not supported in that version but that would be inconsistent with the option being described in the --help output.
Perhaps the /bin/ls binary is dependent on a shared library to implement the -h/--human-readable option and that library is AWOL. Do other commands such as df work with the -h/--human-readable option?
I can't see why /bin/ls would be making any system calls while parsing its options but running /bin/ls via strace just might give a clue and is easy to do.
Does /bin/ls --human-readable work on any other Fedora 8 systems? If so, can you copy /bin/ls from the problem system to a system where it works (under a different name!) and see if it works there? Can you compare checksums of /bin/ls on the problem system and on other Fedora 8 systems (running the same version of /bin/ls)?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.