![]() |
![]() |
#1 |
I quite division it
"Chris"
Feb 2005
England
31·67 Posts |
![]()
Hi
I am running a sr2sieve in Ubuntu and have just opened the folder containing the files. There are over 24000 files named "factors.txt.u1confict" to "factors.txt.u1conflct.24819"! Something to do with Ubuntu One apparently but I uninstalled that days before running this sieve. ![]() The files appear to contain the delta factors between saving or something. (I hope.) I haven't managed to open one yet because everything grinds to a halt when I double-click. So I need a script please that runs srfile, removing the factors for each file. (I'll delete them manually afterwards when I've checked everything.) Much appreciated! Actually, maybe a better idea. How do I join the files together to make "allfactors.txt"? (A copy.) Because I would like to keep them all. How do I stop this happening? The folder isn't synced to anything. Last fiddled with by Flatlander on 2011-02-20 at 17:56 |
![]() |
![]() |
![]() |
#2 |
"Ed Hall"
Dec 2009
Adirondack Mtns
22·11·131 Posts |
![]()
I'm totally unfamiliar with sr2sieve, but could research it if necessary. I am a little familiar with linux/Ubuntu. I also may be misreading your request - my apologies, if so.
Can you right-click and choose gedit to read the file(s), or are they misbehaving because they aren't really text? Can you use cat to combine the files, or does that make them even worse?: Code:
cat factors.txt.u1confict.* > allfactors.txt Last fiddled with by EdH on 2011-02-20 at 21:36 |
![]() |
![]() |
![]() |
#3 |
I quite division it
"Chris"
Feb 2005
England
81D16 Posts |
![]()
I think the files are text but due to the number of small files in the folder (I assume) things stall for ages when I double-click. But I can see the first lines on the icon.
I'll try 'cat' tomorrow. Thanks. ![]() Last fiddled with by Flatlander on 2011-02-20 at 22:08 |
![]() |
![]() |
![]() |
#4 |
"Ed Hall"
Dec 2009
Adirondack Mtns
22·11·131 Posts |
![]()
If you can locate a particular line in the file, that has the info you want AND it appears at the same point in each file, you can try the following Perl script:
Code:
#!/usr/lib/perl $inFile = "uniqueList"; $outFile = "wantedData"; $lineWanted = ###; system("ls factors.txt.u1confict.* > $inFile"); open (OUT, ">$outFile"); open (IN, $inFile); while (<IN>){ $tempFile = $_; open (TEMP, $tempFile); for ($i=0;$i<$lineWanted;$i++){ $lineData = <TEMP>; } close (TEMP); print OUT "$lineData"; } close (IN); close (OUT); If the data is on different lines, but identifiable by something like a label, we can retrieve it that way instead - a little more complicated, but quite doable. |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Stockfish game: "Move 8 poll", not "move 3.14159 discussion" | MooMoo2 | Other Chess Games | 5 | 2016-10-22 01:55 |
Aouessare-El Haddouchi-Essaaidi "test": "if Mp has no factor, it is prime!" | wildrabbitt | Miscellaneous Math | 11 | 2015-03-06 08:17 |
"On factors of Mersenne numbers" - Seiji Tomita | cheesehead | Math | 6 | 2009-12-15 17:45 |
Would Minimizing "iterations between results file" may reveal "is not prime" earlier? | nitai1999 | Software | 7 | 2004-08-26 18:12 |