Re: can't ls /tmp when the directory is HUGE

From: Winston (_at_ubeblock.psr.com.invalid)
Date: 08/16/05

  • Next message: Frank Langelage: "Re: can't ls /tmp when the directory is HUGE"
    Date: Tue, 16 Aug 2005 17:02:33 GMT
    
    

    allon.dafner@gmail.com writes:
    > I had a (stupid) bug that caused the creation of a very large amount of
    > small files in /tmp.
    > Now I can't 'ls' the /tmp dir :((
    > 'rm' appears to be not working too.
    >
    > This is what I have:
    >
    > ad@sun1:/ > ls -ld /tmp
    > drwxrwxrwt 5 root 194066659 Aug 16 18:17 /tmp/
    >
    > ad@sun1:/ > df -k /tmp
    > Filesystem kbytes used avail capacity Mounted on
    > swap 35388544 30272 35358272 1% /tmp

    Last time I ran into something resembling this, what I found was: things do
    work, but they take a very, very, very, long time as the system will walk
    down all those directory blocks. It'll take even longer if you have 'ls'
    aliased to something like "/bin/ls -F !*", since that has to open the files
    as well as read the directory entries.

    Deleting the files won't help, because the problem is the size of the
    directory, and directories don't shrink (that I know of).

    Since it's swap on /tmp, probably the easiest solution is to umount then
    mount /tmp, or reboot, which will start you out with a new, smaller
    /tmp(swap) directory. Of course, that'll lose the files in /tmp, too.
    HTH,
     -WBE


  • Next message: Frank Langelage: "Re: can't ls /tmp when the directory is HUGE"

    Relevant Pages

    • cant ls /tmp when the directory is HUGE
      ... I had a (stupid) bug that caused the creation of a very large amount of ...
      (comp.sys.sun.admin)
    • Re: Giving an application a window icon in a sensible way
      ... Saying you found a bug is generally ... would not accept the standard solution, ... have inferred an insult, and I see I used the word "stupid". ...
      (comp.lang.java.programmer)
    • Re: Mysterious network IO behavior - Progress
      ... There was a bug in the program. ... It didn't change the amount of data written to the transmit buffer, but it did change where in the ring buffer that data came from, and it did increase the number of calls to write. ... No sysctl modification. ...
      (comp.unix.programmer)
    • Re: Calculating v[t], x[t], and t[t] for an constant accelerated object.
      ... |> small amount to gain a massive amount of stupidity and be equal to you? ... | much about, they may appear to be stupid, because they are attempting ...
      (sci.physics.relativity)
    • Re: Deer TSA
      ... The TSA's reaction to his petulance was stupid. ... But asking someone with a large amount of cash a question is not a civil rights violation. ... The TSA is charged with increasing air safety and security. ...
      (rec.sport.football.college)