mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2011-02-20, 17:55   #1
Flatlander
I quite division it
 
Flatlander's Avatar
 
"Chris"
Feb 2005
England

31·67 Posts
Default "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
Flatlander is offline   Reply With Quote
Old 2011-02-20, 21:33   #2
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

22·11·131 Posts
Default

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
EdH is offline   Reply With Quote
Old 2011-02-20, 22:08   #3
Flatlander
I quite division it
 
Flatlander's Avatar
 
"Chris"
Feb 2005
England

81D16 Posts
Default

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
Flatlander is offline   Reply With Quote
Old 2011-02-21, 02:32   #4
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

22·11·131 Posts
Default

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);
Save the above using a text editor as <filename>.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 <filename>.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.
EdH is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
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

All times are UTC. The time now is 02:11.


Thu Oct 5 02:11:16 UTC 2023 up 21 days, 23:53, 0 users, load averages: 1.34, 1.09, 0.95

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔