LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-27-2008, 01:46 AM   #1
vasulogin
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
Red face Facing a Problem with "ls" command.


Hi..

can some tell me how to come out with "ls" command problem. the Problems is as shown bellow.

[root@vasant ~]# ls -h
ls: invalid option -- h
Try `ls --help' for more information.
[root@vasant ~]# ll -h
ls: invalid option -- h
Try `ls --help' for more information.


here with ls -h option is not working and when I checked with version it was changed to older.

i.e.,

[root@vasant ~]# ls --version
ls - GNU fileutils-3.13
[root@vasant ~]#


When the OS (I'm using CentOS 5 before this i was RHEL 5. due to same problem i went with reinstall option and i change over to CentOS 5) was installed it was working fine. after some days i started with above problem.

So please help me to come out with this problem. or else i need to keep re-installing the OS, which i cant do it as my system is a small server with nfs configured.


Thanks in advance.
 
Old 11-27-2008, 02:34 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Interesting. On my F8 I get

>ls --version
ls (GNU coreutils) 6.9

I wouldn't have expected that large a diff in version nums.

Try

which ls

Also, try re-installing fileutils from the DVD and then immediately check the -h flag and the version.
There's a small possibility someone has put a different (rogue ? ) version on your system.
 
Old 11-27-2008, 03:21 AM   #3
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Always back to Fedora
Posts: 263

Rep: Reputation: 51
Also see if you have ls (or anything else for that matter) aliased. Use the "alias" command to find out whether ls is aliased.
 
Old 11-27-2008, 03:49 AM   #4
jiobo
Member
 
Registered: Nov 2008
Posts: 180

Rep: Reputation: 36
FC10 "ls (GNU coreutils) 6.12", ls -h works fine.
 
Old 11-27-2008, 04:28 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
As already suggested check if ls is aliased to something else and/or points to an older installed package. Try:
Code:
type ls
which ls
whereis ls
The GNU fileutils package has been dismissed long time ago. Here it is the explanation from the GNU website:
Quote:
Fileutils, Shellutils, and Textutils have been combined into the GNU Coreutils package.
All further development and discussion is now taking place as Coreutils. The last separate
versions were fileutils-4.1.11, textutils-2.1, and sh-utils-2.0.15. The first major release
of coreutils-5.0 was announced on Fri, 4 April 2003.
 
Old 11-27-2008, 04:53 AM   #6
tajamari
Member
 
Registered: Jul 2007
Distribution: Red Hat CentOS Ubuntu FreeBSD OpenSuSe
Posts: 252

Rep: Reputation: 30
Quote:
Originally Posted by vasulogin View Post
Hi..

can some tell me how to come out with "ls" command problem. the Problems is as shown bellow.

[root@vasant ~]# ls -h
ls: invalid option -- h
Try `ls --help' for more information.
[root@vasant ~]# ll -h
ls: invalid option -- h
Try `ls --help' for more information.


here with ls -h option is not working and when I checked with version it was changed to older.

i.e.,

[root@vasant ~]# ls --version
ls - GNU fileutils-3.13
[root@vasant ~]#


When the OS (I'm using CentOS 5 before this i was RHEL 5. due to same problem i went with reinstall option and i change over to CentOS 5) was installed it was working fine. after some days i started with above problem.

So please help me to come out with this problem. or else i need to keep re-installing the OS, which i cant do it as my system is a small server with nfs configured.


Thanks in advance.
Run rootkit hunter to check if your system has been hacked. ls -h should work on any system
 
  


Reply

Tags
comand


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Feeding the output of "diff" or "cat" command to dpkg --purge kushalkoolwal Debian 9 06-19-2008 08:27 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
"stalled" problem in " scp" command gentleshark Linux - Software 1 08-30-2005 03:08 AM
"stalled" problem in " scp" command gentleshark Linux - Networking 1 08-29-2005 01:41 PM
What can I do facing boot "kernel panic", except reinstallation? yuzuohong Linux - General 1 03-21-2003 10:15 PM


All times are GMT -5. The time now is 02:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration