- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: rm command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 08:35 PM
04-17-2002 08:35 PM
rm command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 08:48 PM
04-17-2002 08:48 PM
Re: rm command
There are some examples given there.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 08:50 PM
04-17-2002 08:50 PM
Re: rm command
Your problem stems from only being able
to remove 256 files in one go.
My workaround, to remove files more than
three days old:
# find /tmp -mtime +3 -print | xargs rm
There is a kernel limit for this, I'll try
to find what you can do to fix this problem.
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 08:55 PM
04-17-2002 08:55 PM
Re: rm command
Here's the syntax you need:
ls | xargs -p -l | xargs rm -i
Hope this helps.
Just be sure of what you want to delete before you do this!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 08:55 PM
04-17-2002 08:55 PM
Re: rm command
Well, you can make this very complicated, but the following script is the easiest form :
#!/usr/bin/sh
for vFile in $(ls *abc*)
do
rm -i $vFile
done
Save the script, chmod 775 script, cd to /tmp
and execute the script.
Replace the "ls *abc*" with the command you want. If you're sure it works, remove the "-i" option from the rm command.
Regards,
Tom Geudens
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 08:55 PM
04-17-2002 08:55 PM
Re: rm command
# cd /stand/build
# /usr/lbin/sysadm/system_prep -s system
==> creates an editable kernel file
# vi system
==> add this line ..
large_ncargs_enabled 1
# /usr/sbin/mk_kernel -s ./system
==> creates the test kernel "vmunix_test"
# mv /stand/system /stand/system.prev
# mv /stand/vmunix /stand/vmunix.prev
# mv /stand/build/system /stand/system
# mv /stand/build/vmunix_test /stand/vmunix
# shutdown -ry 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 09:11 PM
04-17-2002 09:11 PM
Re: rm command
# cd /tmp/test
# for i in `ls`;do rm -f $i;done
Tested it works where rm * failed.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 11:49 PM
04-17-2002 11:49 PM
Re: rm command
Try this,
for i in ls
do
rm $i
done
Very simple...
Hope this help,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2002 03:32 AM
04-18-2002 03:32 AM
Re: rm command
Why not use:
umount /tmp
newfs /dev/vg00/rlvolxxx
mount /tmp
faster, cleaner, and ... excessive?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2002 03:51 AM
04-18-2002 03:51 AM
Re: rm command
root@tm4xm1a> ll | wc
6160 55433 548164
root@tm4xm1a> pwd
/var/tmos/logs/tap/eadir/fs/ANTKPN1A
root@tm4xm1a> date;find . -exec rm -f {} \; ; date
Thu Apr 18 13:49:02 METDST 2002
rm: cannot remove .. or .
Thu Apr 18 13:50:08 METDST 2002
root@tm4xm1a> ll | wc
1 2 8
root@tm4xm1a>
You might want to leave out the date commands... these was just there to see how long it would take to erase the 6160 files present.