טיפ: חיפוש חבילות וקבצים
יולי 28, 2006,
3801 צפיות
, מאת: מאיר קריחלי
תגים:
ניהול חבילות
חיפוש חבילה
ישנן מספר דרכים לחפש מידע על חבילות וקבצים השייכים לחבילות. כדי לחפש חבילה אפשר להשתמש בפקודה apt-cache search ולאחריה טקסט פשוט או ביטוי רגולרי. לדוגמא:$ apt-cache search rsync apt-proxy - Debian archive proxy and partial mirror builder development backuppc - high-performance, enterprise-grade system for backing up PCs debmirror - Debian partial mirror script, with ftp and package pool support dirvish - Filesystem based backup system using rsync drsync - wrapper for file synchronisation via rsync duplicity - encrypted bandwidth-efficient backup flamethrower - Multicast file distribution utility flashybrid - automates use of a flash disk as the root filesystem lg-issue104 - Issue 104 of the Linux Gazette. lg-issue67 - Issue 67 of the Linux Gazette. libfile-rsync-perl - perl module interface to rsync(1) libfile-rsyncp-perl - A perl based implementation of an Rsync client librsync-dev - Library which implements the rsync remote-delta algorithm librsync1 - Library which implements the rsync remote-delta algorithm maildirsync - simple and efficient Maildir synchronisation utility mirror - Keeps FTP archives up-to-date rdiff - Binary diff tool for signature-based differences rdiff-backup - incremental backups using binary deltas replicator - automate new computer installations in a networked site. rsync - fast remote file copy program (like rcp) rsyncrypto - rsync friendly encryption systemimager-ssh-i386 - SystemImager boot binaries for i386 client nodes systemimager-ssh-ia64 - SystemImager boot binaries for ia64 client nodes unison - A file-synchronization tool for Unix and Windows zsync - client-side implementation of the rsync algorithm rssh - Restricted shell allowing only scp, sftp, cvs, rsync and/or rdist systemimager-boot-i386-standard - SystemImager boot binaries for i386 client nodes systemimager-boot-ia64-standard - SystemImager boot binaries for ia64 client nodes systemimager-client - Utilities for creating an image and upgrading client machines systemimager-common - Utilities and libraries common to both the server and client systemimager-doc - Manual and other documentation systemimager-server - Automate GNU/Linux installs and upgrades over a network systemimager-server-flamethrowerd - SystemImager boot binaries for i386 client nodesהפקודה מחפשת בשם החבילה, התאור המקוצר והתאור המורחב שלה. כדי לצמצמם חיפוש אפשר לחפש רק בשם החבילה והתיאור המקוצר בעזרת הדגל -n או --names-only:
$ apt-cache search -n rsync drsync - wrapper for file synchronisation via rsync libfile-rsync-perl - perl module interface to rsync(1) libfile-rsyncp-perl - A perl based implementation of an Rsync client librsync-dev - Library which implements the rsync remote-delta algorithm librsync1 - Library which implements the rsync remote-delta algorithm maildirsync - simple and efficient Maildir synchronisation utility rsync - fast remote file copy program (like rcp) rsyncrypto - rsync friendly encryption
איתור חבילה לפי שם קובץ השייך אליה
ניתן לאתר שייכות קובץ לחבילה מותקמת בעזרת dpkg -S:dpkg -S /usr/bin/bzcat bzip2: /usr/bin/bzcatכפי שניתן לראות קובץ זה שייך לחבילת bzip2. חסרון הפקודה הזו הוא שהחיפוש מתבצע רק בחבילות מותקנות. לפעמים יש צורך לאתר קובץ חסר, לדוגמא כאשר בונים חבילה מקוד מקור וחסרות ספריות פיתוח. עבור כך אפשר להשתמש בפקודה apt-file. אם היא אינה מותקנת במערכת, יש להתקינה:
# apt-get install apt-fileלפני שמריצים אותה, יש לוודא שבסיס הנתונים שלה מעודכן:
# apt-file updateלאחר סיום העדכון, ניתן לחפש לפי הקובץ. לדוגמא, חסרה לנו ספריית הפייתון לעבודה עם parted:
$ apt-file search parted.py python-parted: usr/lib/python2.4/site-packages/parted.pyכפי שניתן לראות, החבילה המכילה את הקובץ נקראת python-parted.
