mersenneforum.org "factors.txt.u1conflict..." files
 Register FAQ Search Today's Posts Mark Forums Read

 2011-02-20, 17:55 #1 Flatlander I quite division it     "Chris" Feb 2005 England 31×67 Posts "factors.txt.u1conflict..." files 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
 2011-02-20, 21:33 #2 EdH     "Ed Hall" Dec 2009 Adirondack Mtns 5×13×53 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 If you could post a couple of the files and what you want retrieved, I could probably throw together something to extract what you want. Python, perl, c++, etc... Last fiddled with by EdH on 2011-02-20 at 21:36
 2011-02-20, 22:08 #3 Flatlander I quite division it     "Chris" Feb 2005 England 31·67 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
 2011-02-21, 02:32 #4 EdH     "Ed Hall" Dec 2009 Adirondack Mtns 5×13×53 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 (){ $tempFile =$_; open (TEMP, $tempFile); for ($i=0;$i<$lineWanted;$i++){$lineData = ; } close (TEMP); print OUT "\$lineData"; } close (IN); close (OUT); Save the above using a text editor as .pl, into the same directory as the "factors.txt.u1confict" files. Change the ### to the number of the line where the data you want to retrieve is located. Then, open a terminal window in that directory and use perl .pl to invoke the script. 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.

 Similar Threads Thread Thread Starter Forum Replies Last Post MooMoo2 Other Chess Games 5 2016-10-22 01:55 wildrabbitt Miscellaneous Math 11 2015-03-06 08:17 cheesehead Math 6 2009-12-15 17:45 nitai1999 Software 7 2004-08-26 18:12

All times are UTC. The time now is 05:04.

Thu Nov 26 05:04:17 UTC 2020 up 77 days, 2:15, 3 users, load averages: 1.53, 1.53, 1.43