Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[Solved] How to find my last emerge --sync date ?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
Chili0_
Tux's lil' helper
Tux's lil' helper
Posts: 80
Joined: Mon Oct 09, 2017 9:24 am

[Solved] How to find my last emerge --sync date ?

  • Quote

Post by Chili0_ » Mon Apr 08, 2019 8:08 am

How to find my last emerge --sync date ?
Thx.
Last edited by Chili0_ on Mon Apr 08, 2019 8:18 am, edited 1 time in total.
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Mon Apr 08, 2019 8:13 am

Code: Select all

# cat /usr/portage/metadata/timestamp.chk 
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56094
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Mon Apr 08, 2019 8:16 am

Chili0_
Look in /usr/portage/metadata/timestamp.chk

What you really need is the date/time of the repository, which is not the same thing. Look at the top of

Code: Select all

emerge --info

Code: Select all

$ emerge --info
Portage 2.3.62 (python 3.6.8-final-0, default/linux/amd64/17.0/no-multilib, gcc-8.3.0, glibc-2.28-r5, 5.0.2-gentoo x86_64)
=================================================================
System uname: Linux-5.0.2-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.6
KiB Mem:    16399056 total,  14142764 free
KiB Swap:    2088432 total,   2088432 free
Timestamp of repository gentoo: Sat, 30 Mar 2019 02:15:01 +0000
...
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Chili0_
Tux's lil' helper
Tux's lil' helper
Posts: 80
Joined: Mon Oct 09, 2017 9:24 am

  • Quote

Post by Chili0_ » Mon Apr 08, 2019 8:18 am

Thx
Top
saturnalia0
Apprentice
Apprentice
Posts: 174
Joined: Thu Oct 13, 2016 3:09 am

  • Quote

Post by saturnalia0 » Tue Jan 10, 2023 7:42 pm

Coming here from Google's first result for "emerge last sync".

Seems like the file location has been moved?

Code: Select all

$ locate timestamp.chk
/var/db/repos/gentoo/metadata/timestamp.chk
/var/db/repos/gentoo/metadata/dtd/timestamp.chk
/var/db/repos/gentoo/metadata/glsa/timestamp.chk
/var/db/repos/gentoo/metadata/news/timestamp.chk
/var/db/repos/gentoo/metadata/xml-schema/timestamp.chk
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

  • Quote

Post by mike155 » Tue Jan 10, 2023 7:50 pm

Code: Select all

# qlop -s
2023-01-01T19:25:43 *** gentoo
2023-01-05T20:42:34 *** gentoo
2023-01-06T17:13:52 *** gentoo
2023-01-08T02:51:18 *** gentoo
Top
Hu
Administrator
Administrator
Posts: 24400
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Tue Jan 10, 2023 7:53 pm

Not exactly. It was, and is, $PORTDIR/metadata/timestamp.chk. The value of $PORTDIR was historically /usr/portage, but more recent systems use /var/db/repos/gentoo.
Top
grknight
Retired Dev
Retired Dev
Posts: 2565
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Tue Jan 10, 2023 8:07 pm

Hu wrote:Not exactly. It was, and is, $PORTDIR/metadata/timestamp.chk. The value of $PORTDIR was historically /usr/portage, but more recent systems use /var/db/repos/gentoo.
Of course this can be customized per install, the definitive location will be $(portageq get_repo_path / gentoo)/metadata/timestamp.chk (and this works for old and new of any date).

This is the repository's date not necessarily when the user did the sync (as they can be different due to outdated mirrors).
Top
psycho
Guru
Guru
User avatar
Posts: 553
Joined: Fri Jun 22, 2007 1:40 am
Location: New Zealand

  • Quote

Post by psycho » Tue Jan 10, 2023 10:35 pm

If you've got e.g.

Code: Select all

HISTTIMEFORMAT="%F %T "
in your (root's) .bashrc, you can just look in your history (history | grep "emerge --sync" or whatever) for the exact time you ran it. Timestamps can be quite handy in BASH history.
Top
Kalin
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 134
Joined: Sun Dec 22, 2002 10:32 am
Location: Germany
Contact:
Contact Kalin
Website

  • Quote

Post by Kalin » Wed Dec 10, 2025 2:52 pm

It was already explained why (a few years ago), and the the one-liner is:

Code: Select all

emerge --info |grep ^Timestamp
e.g.

Code: Select all

$ emerge --info |grep ^Timestamp
Timestamp of repository gentoo: Wed, 10 Dec 2025 14:15:00 +0000
Top
Post Reply

10 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic