![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Search for a string and copy the entire line | forumthreads | UNIX for Dummies Questions & Answers | 3 | 06-29-2009 07:29 AM |
| Copy / string. | Paulw0t | Shell Programming and Scripting | 6 | 03-10-2007 11:26 PM |
| Search a string from list of input files | sivakumarvenkat | UNIX for Dummies Questions & Answers | 2 | 03-08-2006 06:08 PM |
| copy and rename list of files | kinmak | UNIX for Dummies Questions & Answers | 7 | 02-27-2005 09:23 PM |
| find and copy string in a file | vascobrito | UNIX for Advanced & Expert Users | 10 | 03-03-2004 02:14 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to List and copy the files containing a string
![]() I have more than 8000 files in a dir, I need to copy to other dir which containing the "sample" I tried grep -il "1189609240791-1268115603299237276@216.109.111.119 ' | cp /tmp/inv Nothing is happening for long time for 100 file dir too, Any one can help me? |
|
||||
|
Quote:
![]() ctlrws001[/tmp/inv1]$ cp $(grep -l "1190151616066-4284832706333417688@216.109.111.119') /tmp/inv/test > ctlrws001[/tmp/inv1]$ grep -l "1190151616066-4284832706333417688@216.109.111.119 > |
|
|||||
|
Quote:
![]() |
|
|||||
|
Just curious, I tried this:
Code:
zsh 4.3.4% for i ({1..400000}) touch "$i".txt
Code:
zsh 4.3.4% rm *txt zsh: argument list too long: rm zsh 4.3.4% autoload zargs zsh 4.3.4% zargs *txt rm -- zargs:168: subscript too big: 397905 zsh 4.3.4% while :;do rm *.txt([1,20000]);done zsh: argument list too long: rm Code:
while :;do rm *.txt([1,10000]);done |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|