- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: probelm whit rm
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
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
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
тАО05-29-2002 08:25 AM
тАО05-29-2002 08:25 AM
I have a problem when i want erase full files of type
-rw-r--r-- 1 nsuser nsgroup 76680 28 mai 13:24 W1784107.tif
and i execute the following command.
sdmadr1:/u2/imagenes >rm ./*.tif
the system request whit the message.
sh: /usr/bin/rm: The parameter list is too long.
thank you.
JRM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2002 08:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2002 08:33 AM
тАО05-29-2002 08:33 AM
Re: probelm whit rm
# cd directroy_name
# rm *tif
OR
# find . -name "*tif" -exec rm {} \;
Use -i option if needed for confirmation !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2002 08:33 AM
тАО05-29-2002 08:33 AM
Re: probelm whit rm
# for i in $(ls *.tif)
>do
>rm $i
>done
There must be a large number of files...
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2002 08:39 AM
тАО05-29-2002 08:39 AM
Re: probelm whit rm
There seem to be lots of files adreesed by *.rif , you can use find as suggested or
find . -name "*.tif" -exec rm {} \;
should do the trick
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2002 08:42 AM
тАО05-29-2002 08:42 AM
Re: probelm whit rm
rm -i *.tif
It will ask for confirmation also
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2002 08:47 AM
тАО05-29-2002 08:47 AM
Re: probelm whit rm
The shell is doing filename expansion and the list is longer than allowed. A good way to circumvent this is to use 'find' and 'xargs' to process "bundles" of files at once. This is "cheaper" than using 'find's 'exec' option since a smaller number of processes are spawned:
# find . -name "*.tif"|xargs -L 500 -i rm {}
This will process 500 files at a time until the list is exhausted.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2002 09:15 AM
тАО05-29-2002 09:15 AM
Re: probelm whit rm
echo ./*.tif | xargs rm
but you will have problem with it, if you have filenames with blanks or special characters in your list. then you can use:
ls -1 | grep [.]tif$ | xargs -i rm "{}"
or
find . -name \*.tif -exec rm {} \;
Be aware that the find-method will delete not only the files in the current dir, but also in all subdirs.
Heiner