설치 시간과 함께 fedora에 설치된 모든 패키지를 나열하는 방법 sudo yum 목록 설치 그러나

나는 그들을 사용하여 나열 할 수 있습니다

sudo yum 목록 설치

그러나 각각을 설치할 때 어떻게 표시합니까?



답변

루트 (또는 사용 sudo)로 yum옵션을 사용하십시오 history.

[root@fedora ~]# yum history list
Loaded plugins: langpacks, presto, refresh-packagekit
ID     | Command line             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
   250 | -y update google-chrome- | 2013-01-30 18:02 | Update         |    1 EE
   249 | -y update                | 2013-01-25 07:11 | Update         |   22
   248 | -y update                | 2013-01-23 17:56 | Update         |   12
   247 | -y update                | 2013-01-23 08:41 | Update         |    9 EE
   246 | -y update                | 2013-01-20 21:49 | Update         |    4
   245 | -x kernel* update        | 2013-01-07 08:11 | Update         |    3

특정 yum거래에 대한 패키지 및 변경 사항을 볼 수 있습니다 .

[root@fedora ~]# yum history info 250
Loaded plugins: langpacks, presto, refresh-packagekit
Transaction ID : 250
Begin time     : Wed Jan 30 18:02:31 2013
Begin rpmdb    : 1624:34a60f2e27ebe4d959f1473055da42645705b96f
End time       :            18:02:59 2013 (28 seconds)
End rpmdb      : 1624:f4ef7af3a97b1f922f41803ba6b9578a7abe3e71
User           : User <user>
Return-Code    : Success
Command Line   : -y update google-chrome-stable.x86_64
Transaction performed with:
    Installed     rpm-4.9.1.3-1.fc16.x86_64               @updates
    Installed     yum-3.4.3-25.fc16.noarch                @updates
    Installed     yum-metadata-parser-1.1.4-5.fc16.x86_64 @koji-override-0/$releasever
    Installed     yum-presto-0.7.1-1.fc16.noarch          @koji-override-0/$releasever
Packages Altered:
    Updated google-chrome-stable-24.0.1312.56-177594.x86_64 @google-chrome
    Update                       24.0.1312.57-178923.x86_64 @google-chrome
Scriptlet output:
   1 Redirecting to /bin/systemctl start  atd.service

다음을 사용하여 히스토리 특정 패키지를 볼 수 있습니다.

[root@fedora ~]# yum history packages-list yum
Loaded plugins: langpacks, presto, refresh-packagekit
ID     | Action(s)      | Package
-------------------------------------------------------------------------------
   148 | Updated        | yum-3.4.3-24.fc16.noarch                           EE
   148 | Update         |     3.4.3-25.fc16.noarch                           EE
    94 | Updated        | yum-3.4.3-23.fc16.noarch
    94 | Update         |     3.4.3-24.fc16.noarch
    52 | Updated        | yum-3.4.3-7.fc16.noarch
    52 | Update         |     3.4.3-23.fc16.noarch
     2 | Updated        | yum-3.4.3-5.fc16.noarch                            EE
     2 | Update         |     3.4.3-7.fc16.noarch                            EE
     1 | Install        | yum-3.4.3-5.fc16.noarch

man 8 yum또는 yum help historyhistory 옵션으로 가능한 추가 옵션을 나열합니다.


답변

나는 그것이 그렇게 yum할 수 있다고 생각 하지는 않지만 다음과 같이 rpm할 수 있습니다.

rpm --queryformat="%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}: %{INSTALLTIME:date}\n" -qa

다음과 같은 항목 목록이 생성됩니다.

firefox-18.0-1.fc18.x86_64: Mon 14 Jan 2013 13:47:42 GMT


답변

Fedora Q & A 사이트에서 비슷한 질문을 하고 답 했습니다 .

Yum은의 기록을 SQLite 데이터베이스에 저장합니다 /var/lib/yum/history. 수동으로 설치된 모든 패키지와 설치 날짜 및 시간을 표시하는이 SQL 조인을 조정할 수있었습니다.

필자의 경우 수동으로 설치 한 패키지에만 관심이 있었기 때문에 원래 시스템에 설치된 것과 비슷한 도구로 새 시스템을 만들 수있었습니다.

다음 명령은 수동으로 설치된 모든 패키지, 트랜잭션 ID, 날짜 및 yum명령을 기록에서 인쇄합니다. 데이터베이스 이름은 시스템마다 다릅니다.

$ sudo sqlite3 /var/lib/yum/history/history-2014-12-03.sqlite "select c.tid, datetime(t.timestamp, 'unixepoch'), c.cmdline from trans_cmdline as c join trans_beg as t where c.tid = t.tid"

출력 예 (열 : 트랜잭션 ID, 날짜, 명령) :

4|2015-02-21 20:28:03|install mutt wget emacs coreutils
5|2015-02-21 20:28:37|install firefox
6|2015-02-21 20:35:02|install pgp-tools


답변