Results 1 to 9 of 9
Is there an easy way to find out when I last sync'ed with the gentoo mirrors?? I've just set up a cron job to emerge --sync , and I'd like ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-29-2005 #1
When did I last emerge --sync ?? [SOLVED]
Is there an easy way to find out when I last sync'ed with the gentoo mirrors?? I've just set up a cron job to emerge --sync, and I'd like to be sure that it actually worked.
Thanks.Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 11-29-2005 #2
this isn't exactly what you wanted but you can ask someone who has already done an emerge sync to check a couple of packages that have been updated since the previous sync against yours.
Here's why Linux is easier than Windows:
Package Managers! Apt-Get and Portage (among others) allow users to install programs MUCH easier than Windows can.
Hardware Drivers. In SuSE, ALL the hardware is detected and installed automatically! How is this harder than Windows' constant disc changing and rebooting?
- 11-29-2005 #3
You could check if /var/tmp/portage has been modified since last timeyou synced.
- 11-29-2005 #4
All emerge calls are logged in /var/log/emerge.log. You might check through there for your last sync.
- 11-29-2005 #5Thanks for the help guys. This is exactly the file I needed.
Originally Posted by Cabhan Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 11-23-2006 #6Just Joined!
- Join Date
- Nov 2006
- Location
- Vienna,Austria
- Posts
- 4
bash-script for getting time of last portage-tree sync
#!/bin/bash
cat /var/log/emerge.log|head -$(cat /var/log/emerge.log|grep -n "Sync completed"|cut -d ":" -f1)|grep -e "Started emerge"|tail -1|cut -d " " -f5-8
Gives you Complete Date & Time of last Portage-Tree sync
Regards,
Matthias
- 11-23-2006 #7
Getting error with your script
Hi. I tried your script but I get this error....
Originally Posted by experiment1598
i have some idea of what is going wrong but i am unable to find a solutionCode:head: cannot open `2970' for reading: No such file or directory head: cannot open `3540' for reading: No such file or directory head: cannot open `3770' for reading: No such file or directory head: cannot open `3918' for reading: No such file or directory head: cannot open `4011' for reading: No such file or directory head: cannot open `4835' for reading: No such file or directory head: cannot open `5230' for reading: No such file or directory head: cannot open `5368' for reading: No such file or directory head: cannot open `5639' for reading: No such file or directory head: cannot open `7411' for reading: No such file or directory
See, 2970 ..........etc. are the line numbers where "sync completed" appears. Some how when piped with cat, head does not see them as line numbers but as a file argument. I tried this (change is shown in red)
But then it saysCode:cat /var/log/emerge.log|head --lines=[-]$(cat /var/log/emerge.log|grep -n "Sync completed"|cut -d ":" -f1)|grep -e "Started emerge"|tail -1|cut -d " " -f5-8
Do you have any idea why this is happening?Code:head: [-]5: invalid number of lines
Thanks
- 11-23-2006 #8Just Joined!
- Join Date
- Nov 2006
- Location
- Vienna,Austria
- Posts
- 4
I tried your Solution and it seems that the "[-]" is the source of the problem.
cat /var/log/emerge.log|head --lines=$(cat /var/log/emerge.log|grep -n "Sync completed"|cut -d ":" -f1)|grep -e "Started emerge"|tail --lines=1|cut -d " " -f5-8
The above solution worked for me.
Matthias
- 03-25-2007 #9Just Joined!
- Join Date
- Mar 2007
- Location
- Chennai, INDIA
- Posts
- 1
The most appropriate way
# cat /usr/portage/metadata/timestamp.chk
Thu, 22 Mar 2007 19:30:08 +0000
The right way to do just what is asked, find when you last sync'ed.



