Re: [Q] Delete file get "parameter too long"

cbaker_at_GOODYEAR.COM
Date: 04/27/04

  • Next message: Drew Myers: "Re: Memory limitation per process in AIX 5.2"
    Date:         Tue, 27 Apr 2004 11:19:28 -0400
    To: aix-l@Princeton.EDU
    
    

    We don't have all the info here, so there is questions, like do you have subdirectories in this dir1 directory and do you have any
    hidden file (dot files) in dir1?

    But, you have gotten a number of ways to delete the files. I write about the reason you see different results with the "wc -l"
    command.

    The

          $ ls -al /user1/dir1/*|wc -l

    will not only list the files and directory names in the present directory (dir1), but it will list the files and directory names of
    each subdirectory in dir1. Then it will give you a grand total.

    Now, your

          ls -lt|wc -l

    does something totally different. Without the asterisks (*), you no longer go down subdirectories. But, without the -a in ls, you no
    longer see the hidden (dot) files. So your count could be quite smaller.

    Likewise, do a

          rm *

    will not remove hidden (dot) files nor will it remove any directories, even if they are empty.

    So, you can see there are many ways to approach the counting and removing of files and not all achieve the same results.

    Christopher M. Baker
    Senior Technical Support Analyst
    DSE/TCO
    Goodyear Tire and Rubber Company

    =================================================
    Contains Confidential and/or Proprietary Information.
    May not be copied or disseminated without the expressed
    written consent of The Goodyear Tire & Rubber Company.
    =================================================

                          bbb bb
                          <mccux1@HOTMAIL. To: aix-l@Princeton.EDU
                          COM> cc: (bcc: Chris Baker/NA/GDYR)
                          Sent by: IBM AIX Subject: [Q] Delete file get "parameter too long"
                          Discussion List
                          <aix-l@Princeton
                          .EDU>

                          04/27/04 08:28
                          AM
                          Please respond
                          to IBM AIX
                          Discussion List

    We have AIX 4.3.3 on RS6000. I tried to delte files and get "parameter too
    long". I need change to that directory to delete it.
    Does anyone know why and how to fix it?

    The procedures I do:

    $ rm /user1/dir1/*
    ksh: /usr/bin/rm: 0403-027 The parameter list is too long.
    $ ls -al /user1/dir1/*|wc -l
    ksh: /usr/bin/ls: 0403-027 The parameter list is too long.
           0
    $ cd /user1/dir1
    $ ls -lt|wc -l
        1042
    $ rm *
    $ ls -al
    total 232
    drwxrwxrwx 2 informix sys 22016 Apr 27 07:00 .
    drwxrwsrwx 16 informix sys 90624 Apr 27 06:01 ..

    Thanks.

    _________________________________________________________________
    Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage!
    http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/direct/01/


  • Next message: Drew Myers: "Re: Memory limitation per process in AIX 5.2"