ls hangs on a directory


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat ls hangs on a directory
# 1  
Old 01-05-2009
ls hangs on a directory

Running Red Hat Enterprise Linux Server release 5.1 (Tikanga) 2.6.18-53.el5

Trying to do an 'ls' of a sub-directory and the prompt never returns. Same problem running a find command as well.

I have done an fsck on the file system (no problems) and can view other sub-directories on this file system.

I can run an strace ls or and ltrace ls and get a response.

I suspect there are too many files in the sub-directory but could use some help.

thanks,

Jon
# 2  
Old 01-05-2009
It is possible that you have an NFS mount to a server you no longer have a connection or access to.

Type mount to see the list of mount points.
Padow
# 3  
Old 01-05-2009
Quote:
Originally Posted by Padow
It is possible that you have an NFS mount to a server you no longer have a connection or access to.

Type mount to see the list of mount points.
No this is a local file system - no NFS mounts exist.
# 4  
Old 01-05-2009
what does
Code:
ls -ld problem_directory
cd problem_directory
df -i .

show? if df completes in finite time ....
# 5  
Old 01-05-2009
Quote:
Originally Posted by jim mcnamara
what does
Code:
ls -ld problem_directory
cd problem_directory
df -i .

show? if df completes in finite time ....
I thought of that....

ls -ld /files/amp
drwxrwxr-x 2 775 oacapp 695459840 Jan 5 13:49 /files/foobar


df -i .
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sdb1 26214400 7541112 18673288 29% /files


I think the problem is too many files in this subdirectory. Not sure how it happened but there are about +6 million files. I am using the output from the strace /bin/ls -l to manage the files. Slow but it is working.
# 6  
Old 01-05-2009
Yes - you have WAY to many files to allow for good performance.

That is exactly what this says:
Code:
drwxrwxr-x 2 775 oacapp 695459840 Jan 5 13:49 /files/foobar

the directory file itself is enormous.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Program Hangs

I have two programs, DriverScale.c and scale9.c. DriverScale.c calls scale 9.c which sends a W and a carraige return to the scale which SHOULD return the weight to DriverScale. However scale 9 hangs for at least 10 min, and then finally returns the weight. Compilation: ... (8 Replies)
Discussion started by: Meow613
8 Replies

2. IP Networking

Ftp hangs

On Oracle Linux 5, 64 bit (derivative of RHEL) ... I have a shell script that runs every Sunday, that ftp's a bunch of files from server 'prod' to server 'test'. Script executes on 'test'. This has been running for YEARS with no problem. Normally the FTP step takes about 1.5 to 2 hours. (pulls... (8 Replies)
Discussion started by: edstevens
8 Replies

3. IP Networking

SFTP hangs

Ok sftp connects but hangs after I enter the password manually The ssh version is 1.0 bash-2.05$ ssh -V SSH Version Sun_SSH_1.0, protocol versions 1.5/2.0. When I go from solaris 9 to sftp to another server with latest proftpd version it hangs after the password. proftpd -V Compile-time... (6 Replies)
Discussion started by: slufoot80
6 Replies

4. Red Hat

Xrdp hangs

Hi, I'm trying to get xrdp to work. I installed xrdp 0.5.0 from EPEL and the Desktop group. Now I can connect to the server with rdesktop, but I can't do any input... there is an authentication window asking the root password "to set the network proxy used for downloading packages" and I can't... (0 Replies)
Discussion started by: FrankVanDamme
0 Replies

5. Hardware

HP DL160G6 hangs

Hi I have HP DL160G6 with SLES10SP3 x64. It hangs without any errors in the logs. My hardware is: description: Rack Mount Chassis product: ProLiant DL160 G6 vendor: HP serial: ******** width: 32 bits capabilities: smbios-2.5 dmi-2.5 configuration:... (0 Replies)
Discussion started by: dailyadm
0 Replies

6. UNIX for Advanced & Expert Users

SFTP. ls and get hangs.

Hello I have a sftp problem. If I do sftp between some nodes that we installed it works fine i can list directories and get files. If I connect with sftp from the other side of a firewall (wich has port 22 open) I can log in and cd to which ever direcory i want i can do pwd but when i do... (4 Replies)
Discussion started by: vettec3
4 Replies

7. Shell Programming and Scripting

SFTP HANGS

Hi , we are writing a shell script to test connection of our destination servers and facing an issue if the destination server doesnt respond. we are using the following command., sftp -B /dev/fd/0 <host@servername> << EOF >> file.txt quit EOF --------- The above command hangs for 20min and... (0 Replies)
Discussion started by: mohanpadamata
0 Replies

8. UNIX for Advanced & Expert Users

SSH hangs

Hi all, At a little bit of loss here. I have a Linux box (Redhat Enterprise 4) that has been working flawlessly for a while, that is until late Tuesday when none of the users could ssh into it. The machine is in a DMZ over which I have no control of the network settings. Here is the debug output... (6 Replies)
Discussion started by: ccj4467
6 Replies

9. Solaris

Explorer hangs

Hi Guys, Anyone encontered a problem where when you run your SUN explorer, it hangs at sysconfig? I am having this problem for some of my servers. rgds, (1 Reply)
Discussion started by: ronny_nch
1 Replies

10. Shell Programming and Scripting

Script Hangs!

Hi, I have script which is based on TCL and expect. It is written to test my code. It usually runs fine for a while and hangs after sometime. Code snippet set l_temp_timeout $timeout OUTPUT_LOG2 2 >>>$expect_out(buffer)<<< OUTPUT_LOG2 2... (2 Replies)
Discussion started by: naveenpn
2 Replies
Login or Register to Ask a Question