LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 06-24-2003, 08:09 PM   #1
ww7258
LQ Newbie
 
Registered: Jun 2003
Posts: 2

Rep: Reputation: 0
Unhappy "ls" hanging on some Solaris 8 file directories


I use “ls” to transverse on my Solaris 8 file system structure. If I “ls /opt” or “ls /export”, the shell command hanging there forever and I have to use Ctrl-C to get out it.
But I have no problem to list directory beneath it such as “ls /opt/Ccase” or “ls /export/home20”. Please advice what is this problem?
 
Old 06-24-2003, 08:42 PM   #2
jdc2048
Member
 
Registered: Jul 2002
Distribution: Redhat, Gentoo, Solaris, HP-UX, etc...
Posts: 391

Rep: Reputation: 30
Are you using any kind of NFS mounted filesystems under those 2 directories?
Try the mount command with no options to see what is mounted.

Do you have an abundance of files or sub-directories in those directories?

Try an "echo *" instead of ls. Check for strange names of files or directories in the output. Strange names might be something like "C:\<Directory>" (Yes I've seen it) or "?Directory" or simply one character jobs like "*", "?", etc...
 
Old 06-25-2003, 04:41 PM   #3
ww7258
LQ Newbie
 
Registered: Jun 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Wink

Hi jdc2048,

Yes, I am using NFS mounted filesystems and I have an abundance of files and sub-directories in those directories.

I try an "echo *" instead of ls. But it still hangs forever and I have Ctrl-C to get out it (the same as using "ls"). Please advice what I can do?

Best regards,
ww7258
 
Old 06-25-2003, 09:16 PM   #4
jdc2048
Member
 
Registered: Jul 2002
Distribution: Redhat, Gentoo, Solaris, HP-UX, etc...
Posts: 391

Rep: Reputation: 30
Are the NFS directly mounted on either of these partitions? And if so, is the remote fileserver up and serving? (showmount -a <server>)

By abundance, how many are we talking? <500, 500-1000, 1000-5000, >5000? Are they in a single directory or are they distributed into many sub-directories? Too many files in a single directory will cause many headaches. You need to break them up into sub-directories.

Also what are the chances that you created a self-referencing soft-link. see example below

Code:
# pwd
/export
# ls -ld home
lrwxrwxrwx  .... .... .... ... home -> /export
A self referencing link like this will cause a recursive problem with the find command, but I don't know if it will cause problems with ls or "echo *".

One thing that never hurts is to run an "fsck" to check the filesystem. You will need to boot to single user, or unmount the FS if possible.
 
  


Reply



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
"bad interpreter : no such file or directory" when configure "flex" acer_peri Linux - Software 10 11-10-2010 01:19 AM
How to write a bash script to replace all "KH" to "K" in file ABC??? cqmyg5 Slackware 4 07-24-2007 09:00 AM
Fedora Core 4# (Final) hanging on "Formatting/File System"... TippyToes Fedora - Installation 6 07-04-2005 11:06 PM
Booting up hanging on "Finding Module dependcies" Red Hat 9 no_names_left Linux - Newbie 4 02-16-2005 12:39 AM
Can't locate object method "splitpath" via package "File::Spec" RobJohnston Linux - General 2 06-28-2003 09:59 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 01:19 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
Open Source Consulting | Domain Registration