【Ubuntu】dpkg-deb -c :查看deb文件中的内容

    xiaoxiao2022-07-05  184

    1、dpkg-deb -c :查看deb文件中的内容
    $ dpkg-deb -c package

    eg:

    $ dpkg-deb -c sogoupinyin_2.2.0.0108_amd64.deb drwxr-xr-x root/root 0 2018-04-18 16:50 ./ drwxr-xr-x root/root 0 2018-04-18 16:50 ./etc/ drwxr-xr-x root/root 0 2018-04-18 16:50 ./etc/X11/ drwxr-xr-x root/root 0 2018-04-18 16:50 ./etc/X11/Xsession.d/ -rw-r--r-- root/root 1427 2018-04-18 16:48 ./etc/X11/Xsession.d/72sogoupinyin drwxr-xr-x root/root 0 2018-04-16 17:42 ./etc/xdg/ drwxr-xr-x root/root 0 2018-04-18 16:50 ./etc/xdg/autostart/ drwxr-xr-x root/root 0 2018-04-16 17:43 ./usr/ drwxr-xr-x root/root 0 2018-04-18 16:50 ./usr/bin/ -rwxr-xr-x root/root 4212560 2018-04-18 16:50 ./usr/bin/sogou-qimpanel -rwxr-xr-x root/root 589336 2018-04-18 16:50 ./usr/bin/sogou-qimpanel-watchdog -rwxr-xr-x root/root 6208 2018-04-18 16:50 ./usr/bin/sogou-sys-notify -rwxr-xr-x root/root 302 2018-04-18 16:48 ./usr/bin/sogou-session -rwxr-xr-x root/root 3118 2018-04-18 16:48 ./usr/bin/sogou-diag drwxr-xr-x root/root 0 2018-04-16 17:43 ./usr/lib/ drwxr-xr-x root/root 0 2018-04-16 17:43 ./usr/lib/mime/ drwxr-xr-x root/root 0 2018-04-16 17:43 ./usr/lib/mime/packages/ -rw-r--r-- root/root 228 2018-04-16 17:33 ./usr/lib/mime/packages/fcitx-ui-sogou-qimpanel drwxr-xr-x root/root 0 2018-03-29 11:36 ./usr/lib/x86_64-linux-gnu/ drwxr-xr-x root/root 0 2018-04-18 16:50 ./usr/lib/x86_64-linux-gnu/fcitx/ -rw-r--r-- root/root 31496 2018-04-18 16:50 ./usr/lib/x86_64-linux-gnu/fcitx/fcitx-autoeng-ng.so -rw-r--r-- root/root 23704 2018-04-18 16:50 ./usr/lib/x86_64-linux-gnu/fcitx/fcitx-fullwidth-char-enhance.so -rw-r--r-- root/root 31368 2018-04-18 16:50 ./usr/lib/x86_64-linux-gnu/fcitx/fcitx-punc-ng.so -rw-r--r-- root/root 2061504 2018-04-18 16:50 ./usr/lib/x86_64-linux-gnu/fcitx/fcitx-sogoucloudpinyin.so -rw-r--r-- root/root 2061504 2018-04-18 16:50 ./usr/lib/x86_64-linux-gnu/fcitx/fcitx-sogoupinyin.so drwxr-xr-x root/root 0 2018-04-18 16:50 ./usr/share/ ...
    2、dpkg-deb详解

    $ dpkg-deb --help Usage: dpkg-deb [ …]

    Commands: -b|–build [] 生成档案deb包. -c|–contents 列出deb包内容. -I|–info [ …] 打印包的信息到标准输出

    $ dpkg-deb -I sogoupinyin_2.2.0.0108_amd64.deb new debian package, version 2.0. size 22915896 bytes: control archive=11879 bytes. 34 bytes, 1 lines conffiles 1446 bytes, 18 lines control 33969 bytes, 343 lines md5sums 3013 bytes, 84 lines * postinst #!/bin/sh 2766 bytes, 78 lines * postrm #!/bin/sh 304 bytes, 13 lines * preinst #!/bin/sh Package: sogoupinyin Version: 2.2.0.0108 Architecture: amd64 Maintainer: Ubuntu Kylin Team <ubuntukylin-members@lists.launchpad.net> Installed-Size: 56991 Depends: fcitx (>= 1:4.2.8.3-3~), fcitx-frontend-gtk2, fcitx-frontend-gtk3, fcitx-frontend-qt4, libfcitx-qt0 | fcitx-libs-qt, fcitx-module-kimpanel, im-config, libopencc2 | libopencc1, lsb-release, unzip, zip, x11-utils, fcitx-libs (>= 4.2.7), libc6 (>= 2.8), libgcc1 (>= 1:4.1.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.12.0), libidn11 (>= 1.13), libnotify4 (>= 0.7.0), libqt4-dbus (>= 4:4.8.0), libqt4-declarative (>= 4:4.8.0), libqt4-network (>= 4:4.8.0), libqtcore4 (>= 4:4.8.0), libqtgui4 (>= 4:4.8.0), libqtwebkit4 (>= 2.1.0~2011week13), libstdc++6 (>= 4.6), libx11-6, zlib1g (>= 1:1.2.0) Recommends: fcitx-frontend-qt5, fonts-noto-cjk, dconf-gsettings-backend | gsettings-backend Section: non-free/utils Priority: optional Homepage: http://pinyin.sogou.com/linux Description: Sogou Pinyin Input Method Based on web search engine technology, Sogou Pinyin input method is the next-generation input method designed for Internet users. As it is backed with search engine technology, user input method can be extremely fast, and it is much more advanced than other input method engines in terms of the volume of the vocabulary database and its accuracy. Sogou input method is the most popular input methods in China, and Sogou promises it will always be free of charge.

    -W|–show 显示包信息

    $ dpkg-deb -W sogoupinyin_2.2.0.0108_amd64.deb sogoupinyin 2.2.0.0108

    -f|–field [ …] 显示指定字段到终端. -e|–control [] Extract control info. -x|–extract Extract files. -X|–vextract Extract & list files. -R|–raw-extract Extract control info and files. –fsys-tarfile Output filesystem tarfile.

    -?, --help 帮助信息. –version 版本.

    <deb> is the filename of a Debian format archive. <cfile> is the name of an administrative file component. <cfield> is the name of a field in the main `control' file.

    Options: –showformat= Use alternative format for --show. -v, --verbose Enable verbose output. -D, --debug Enable debugging output. –deb-format= Select archive format. Allowed values: 0.939000, 2.0 (default). –old Legacy alias for ‘–deb-format=0.939000’. –new Legacy alias for ‘–deb-format=2.0’. –nocheck Suppress control file check (build bad packages). -z# Set the compression level when building. -Z Set the compression type used when building. Allowed types: gzip, xz, bzip2, none. -S Set the compression strategy when building. Allowed values: none; extreme (xz); filtered, huffman, rle, fixed (gzip).

    Format syntax: A format is a string that will be output for each package. The format can include the standard escape sequences \n (newline), \r (carriage return) or \ (plain backslash). Package information can be included by inserting variable references to package fields using the ${var[;width]} syntax. Fields will be right-aligned unless the width is negative in which case left alignment will be used.

    Use ‘dpkg’ to install and remove packages from your system, or ‘apt’ or ‘aptitude’ for user-friendly package management. Packages unpacked using ‘dpkg-deb --extract’ will be incorrectly installed !

    最新回复(0)