Solved

AIX - "parameter list is too long" Issue

Posted on 2013-05-22
5
38 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

679 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