[Trisquel-users] Re : How can awk as a substitute for paste

2020-07-13 Thread lcerf
Save the script I wrote in a file, turn it executable and execute it in a  
terminal.  Without any argument, it  asks the kernel to write the buffered  
data to disk every five second (you can change this default editing the  
number 5 at the beginning of the script).  With one argument, you can specify  
a different period.  It must be a valid argument to 'sleep': 2 or 2s for two  
seconds, 5m for five minutes, etc.  Any number of files can be given as  
additional arguments: if so, only those files will be sync'ed.


Your "thoughtful guess" makes little sense: no data flows in the first pipe,  
all your '-' are useless (most commands process the standard input by  
default; also, the quotes are here useless), the sed substitution writes  
parentheses that tr removed immediately after, the second awk prints $3 that  
does not exist (the first awk only kept two fields) and, as I have already  
told you many many times (the last time was one week ago:  
https://trisquel.info/forum/another-uniq-u-feature-emerges#comment-150310),  
sort -k 1 is the same as sort alone (you probably want sort -k 1,1).


followed by sync's responses

sync does not write anything (but errors).  time outputs what you show.

without any actual conclusion of the script; the prompt hasn't reappeared  
yet, even though there is no network activity. I used Ctrl+C to regain the  
prompt.


The while loop is infinite.  That is why I told you "Type Ctrl+C to  
terminate" in  
https://trisquel.info/forum/how-can-awk-substitute-paste#comment-150532


Where was sync saving the cached output during the 4-1/4 hours the script was  
running ?


Please read  
https://trisquel.info/forum/how-can-awk-substitute-paste#comment-150543  
again.  I suspect you do not understand the concept of a data buffer.   
Without such a buffer, whenever something is to be written in a file, it  
would be directly written onto the disk.  Nevertheless, writing many times  
small amounts of data onto the disk is slow.  It is more efficient to  
accumulate in RAM the data and to make one big write when a lot was  
accumulated or when necessary.  sync tells the kernel (which manages the  
buffer) "it is necessary".


Re: [Trisquel-users] Laptop lid linked to power management

2020-07-13 Thread jimgarrett
Thanks, this makes sense when you put it that way.  And in fact I have an  
update:  as I was trying to figure out where interrupts might be, I set it  
down and a screw fell out.  It secures a corner of the bottom--and other  
things, apparently.  I screwed it back in tight and now my problem is gone.   
This corner is where the power button is located so I think it did something,  
somehow.


Thanks again!


Re: [Trisquel-users] How can awk as a substitute for paste

2020-07-13 Thread amenex

Here's the result from my first thoughtful guess:
while sleep 300; do sync -f  
/home/george/Desktop/May2020/nMapScans/ScoreCards-IPv4/SyncIPv4/; done | time  
sudo nmap -Pn -sn -T4 --max-retries 8 -iL Addresses.IPv4.May2020.37.txt -oG -  
| grep "Host:" '-' | awk '{print $2,$3}' '-' | sed 's/()/(No_DNS)/g' | tr -d  
'()' | uniq -c | awk '{print $3"\t"$2}' '-' | sort -k 1 >  
SyncIPv4/Random.IPv4.May2020.37.nMap.primary.oG.txt


Nothing appeared until the script finished, whereupon time added the  
following:

195.00user 99.48system 4:15:16elapsed 1%CPU
followed by sync's responses:
 (0avgtext+0avgdata 13032maxresident)k0inputs+0outputs  
(0major+2486minor)pagefaults 0swaps
without any actual conclusion of the script; the prompt hasn't reappeared  
yet, even though

there is no network activity. I used Ctrl+C to regain the prompt.

Where was sync saving the cached output during the 4-1/4 hours the script was  
running ?


There were many singular PTR records, a modest number of No_DNS responses,  
and few, if any, multi-address PTR's.


[Trisquel-users] How can I help bring new packages to Trisquel?

2020-07-13 Thread lofenyy
I recently switched to Trisquel as my daily driver from Arch. I've noticed a  
few packages have lagged behind enough to noticeably effect usability. For  
example, I've followed instructions elsewhere to update my youtube-dl from  
upstream. I figure if I'm already going to do this, I could help package  
these newer versions also. What's the process for bringing updated versions  
of these packages to Trisquel? 


[Trisquel-users] Re : How can awk as a substitute for paste

2020-07-13 Thread lcerf
I haven't the slightest clue where sync stores the data in persistent  
storage; if I knew, I could watch it develop.


'sync' just tells the kernel to write the buffered data to disk.  To the  
files where they would have eventually been written: watch your output files.


Re: [Trisquel-users] ¿Es PureOS realmente totalmente libre?

2020-07-13 Thread mason

> ¿Es PureOS realmente totalmente libre?

No.[1][2]  La FSF no debe promocionar PureOS.

[1]: https://trisquel.info/en/forum/another-path#comment-150090

[2]: https://trisquel.info/en/forum/another-path#comment-150091


Re: [Trisquel-users] How can awk as a substitute for paste

2020-07-13 Thread amenex
While all this coding was going on, I discovered a flaw in my logic, whereby  
my method of
separating not-looked-up IPv4 addresses from the Recent Visitor data was  
extracting some
lookalike IPv4 data from the hostnames, including impossible addresses. I  
used comm to
select only those addresses that were in both the calculated list and the  
Recent Visitor
data, reducing the list of extracted two-octet prefixes from over 50,000 to  
around 27,000.


Naturally, now that Magic Banana tells us that awk won't do what I expect,  
sure enough, it

stopped causing those user-friendly intermediate writes.

The man sync and info sync pages are not helping me; as yet I haven't the  
slightest clue
where sync stores the data in persistent storage; if I knew, I could watch it  
develop.


There are now 38 files to be created with long-running nmap scripts; if I  
could write one
sync script before I start and not stop it until the last of those 38 files  
finishes, and
still be able to watch the occasional disk writes so I could evaluate  
progress of the scripts,
that would be ideal. If I could list the 38 output files in advance, that  
would save a lot

of scrambling while the nmap searches are onging about ten at a time.

The good news is that when nmap started complaining about 942.103.*.*  
addresses, I used
grep to search all the Recent visitor files and found (in a few seconds)  
three instances of:

as45942.103.28.157.43.lucknow.sikkanet.com

Dig -x reveals that the actual IP address is 103.28.157.43, not  
942.103.28.157, neither of
which ought to contribute to the two-octet prefix list (but 103.28 got in  
there anyway !)


If I create a subfolder called Sync under the May2020/IPv4 folder and store a  
list of the
expected output filenames to which sync is to be applied in a text file  
there, can sync be
made to activate and save cached data  to the appropriate filename as soon as  
the nmap script

is started ?

George Langford




Re: [Trisquel-users] ¿Es PureOS realmente totalmente libre?

2020-07-13 Thread lucas
Sorry, this post is for the spanish forum, this is a mistake!!! (sorry my  
english is poor)


[Trisquel-users] ¿Es PureOS realmente totalmente libre?

2020-07-13 Thread lucas
Buenas, el otro día probé PureOS, el cual contiene Thunderbird, Chromium y  
Firefox-ESR en sus repositorios y algunos en el sistema. ¿Chromium no era  
software totalmente libre ya que tenia algunos paquetes sin licenciar? y  
¿Firefox-ESR y Thuderbird tienen sus logos con marca registrada y no permite  
su distribución de forma paga?. Según leí en las pautas de distribuciones  
100% libres se pueden tener programas con logos con marca registrada si se  
pueden cambiar los logos fácilmente o algo similar, no se si este es el  
caso, por favor decirme si es así. El punto es, ¿PureOS sigue siendo  
totalmente libre o no?, no estoy seguro y me gustaría que me dijeran  
información al respecto.



https://www.mozilla.org/en-US/foundation/trademarks/policy/

https://directory.fsf.org/wiki/Collection:GNU/Linux (aquí dice que Firefox y  
Thuderbird son software privativo)


https://www.gnu.org/distros/free-system-distribution-guidelines.es.html FSDG  
se menciona sobre programas con marca registrada.




[Trisquel-users] Re : How can awk as a substitute for paste

2020-07-13 Thread lcerf
'awk' does not aim to synchronize cached writes to persistent storage.   
'sync' does.  To call it every 5 seconds:

while sleep 5
do
sync
done

But you do not want a hard-coded value.  A default is good though.  Also, for  
greater performances, you should be able to give the list of the files to  
sync.  That gives a script such as:

#!/bin/sh
if [ -z "$1" ]
then
while sleep 5
do
sync
done
fi
if [ -z "$2" ]
then
while sleep $1
do
sync
done
fi
period="$1"
shift
while sleep $period
do
sync -d "$@"
done


Type Ctrl+C to terminate.


[Trisquel-users] How can awk as a substitute for paste

2020-07-13 Thread amenex
Some time ago I noticed that an awk script piped into a long-running nmap  
script caused the overall
script to make relatively frequent saves of the output file, providing some  
assurance that the script
was making progress and providing a record of its accomplishment. That  
occasionally allowed me to restart
the script (as in the case of a loss of mains power) to pick up where the  
script stopped by truncating
its source file and thereby avoiding having to run the entire source file  
from the beginning.


Here's such a script:
awk '{print $1}' 'B-May2020-L.768-secondary.txt' | sudo nmap -6 -Pn -sn -T4  
--max-retries 16 -iL '-' -oG - | grep "Host:" '-' | awk '{print $2,$3}' '-' |  
sed 's/()/(No_DNS)/g' | tr -d '()' | uniq -u >  
May2020-L.768-secondary.oGnMap.txt


There is no other need for
awk '{print $1}' 'B-May2020-L.768-secondary.txt'
because it's not actually changing the file, but the result of its use is to  
provide the extremely
helpful & protective effect of causing the overall script to make frequent  
saves to HDD.


Now I am using a paste script immediately before the nmap script, but this  
similar use of the pipe
process is not causing any peridic saves to take place. With fifteen such  
scripts running at once,

a lot of data can disappear if the mains power is lost in a windstorm.

The source file in each example is simply a list of IPv6 or IPv4 addresses  
made up in parts of real
and randomly generated blocks with nothing that requires rearrangement or  
sorting.


A crude way of accomplishing this could be to insert a similar redundant awk  
script between the
paste and nmap sections of the main script, but is there a more geek-like way  
of forcing the
script to make periodic saves ? That method need not be especially efficient,  
as my network's
sending/receiving speeds appear to be the rate-limiting factors, presently  
about 30 kB/second.


George Langford



Re: [Trisquel-users] after crypt setup, Trisquel does not be loaded

2020-07-13 Thread msuzuqi
Yes, I would need that for expected something future trouble but  
unfortunately I cannot see the advanced screen anymore. But it's OK. This is  
not the end of life of mine.