Pejman Moghadam / Slackware

Slackware 12.2 - Error: Argument list too long

Public domain


Problem

# rm -rf /var/spool/clientmqueue/*
/usr/bin/rm: Argument list too long

Solution 1

find /var/spool/clientmqueue  -type f -print -delete

Solution 2

#!/bin/bash
cd /var/spool/clientmqueue
while true; do
  FN=$(ls | head -n 1 | cut -b 1-6)
  if [ "$FN" == "" ]; then
    break
  fi
  echo "$FN"
  rm -rf $FN*
done

BY: Pejman Moghadam
TAG: clientmqueue, error
DATE: 2009-04-25 00:15:47


Pejman Moghadam / Slackware [ TXT ]