LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
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
 
LinkBack Search this Thread
Old 11-27-2008, 12: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, 01:34 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.2, Centos 5.8
Posts: 11,740

Rep: Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905
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, 02:21 AM   #3
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Fedora
Posts: 220

Rep: Reputation: 43
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, 02: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, 03:28 AM   #5
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: OpenSUSE 12.1 CentOS 6.2
Posts: 8,998

Rep: Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349
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, 03:53 AM   #6
tajamari
Member
 
Registered: Jul 2007
Distribution: Red Hat CentOS Ubuntu FreeBSD OpenSuSe
Posts: 243

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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 07:27 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
"stalled" problem in " scp" command gentleshark Linux - Software 1 08-30-2005 02:08 AM
"stalled" problem in " scp" command gentleshark Linux - Networking 1 08-29-2005 12:41 PM
What can I do facing boot "kernel panic", except reinstallation? yuzuohong Linux - General 1 03-21-2003 09:15 PM


All times are GMT -5. The time now is 06:54 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration