Solved

AIX - "parameter list is too long" Issue

Posted on 2013-05-22
5
36 Views
Last Modified: 2016-07-05
I have the following Issue

root> ls -l ./*/*.html
ksh: /usr/bin/ls: 0403-027 The parameter list is too long.

Without changing the ARG_MAX, How do I list all the .html files and delete them
0
Comment
Question by:sriveena2010
  • 2
5 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 250 total points
ID: 39188304
List:

find /start/dir -type f -name "*.html" -ls

Delete:

find /start/dir -type f -name "*.html" | xargs rm

Replace /start/dir with the path to the directory where you want to start the search.
0
 
LVL 23

Assisted Solution

by:nemws1
nemws1 earned 250 total points
ID: 39189312
Or just with the find command (should handle more oddly named files, spaces, etc)
find /start/dir -type f -name "*.html" -exec rm "{}" \;

Open in new window

0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 41690663
Once more a very simple question and two simple (equivalent) answers.
The solutions given in
https:#a39188304  and
https:#a39189312
are both correct and verifiable just by consulting the "man" pages,
so points should be split.

wmp
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question