Академический Документы
Профессиональный Документы
Культура Документы
Chapter Eleven
Compressing Files
Compressing files
Useful way to use less space for rarely accessed data Makes files smaller before transmitting them over network
gzip command
Compress any file; best compression 60-70% of original size Lempel-Ziv Compression gzip v sample sample.gz -v verbose option zcat sample.gz to view compressed file contents
gunzip command
Uncompresses file compressed using gzip gunzip v sample.gz Alternative: gzip d sample.gz
Compressing Files
bzip2 command
Compress any file; better compression than gzip BurrowsWheeler transform and Huffman coding bzip2 v sample sample.bz2 -v verbose option bzcat sample.bz2 to view compressed file contents
bunzip2 command
Uncompresses file compressed using gzip bunzip2 v sample.bz2 bzip2 d sample.bz2
System Backup
System backup: process whereby files are copied to an archive Archive: location (file or device) that contains copy of files
Typically created by a backup utility
Should backup user files from home directories and any important system configuration files
Possibly files used by system services as well
tar command
Create tar archive Specify files to be included in backup archive on command line Writes data to file name or device
Designed to backup entire filesystems to an archive /etc/dumpdates: file used to store information about incremental and full backups
dump command: create archives for full or incremental backup restore command: extract archives created with dump
Burning Software
tar, cpio, and dump utilities copy data to backup medium in character-by-character or block-by-block format
Typically used with tape, floppy, and hard disk media
Ubuntu comes with k3b Disc Burner burning software Fedora comes with Brasero Disc Burner burning software
Managing Packages
Linux groups related files into packages for easier management Software package contains all files needed to install and use application Red Hat Package Manager format
Abbreviated as rpm
rpm command
Install new software packages Erase software packages from system
Can use regular expression to specify package names rpm utility maintains internal database of keys Key is part of encryption information used to digitally sign rpm file
yum command: used to search Internet software repositories for RPM packages
Installs dependent packages if necessary yum install packagename command yum update packagename command KPackageKit: graphical utility for installing or updating packages
alien
Converts RPM to DEB Packages sudo aptitude install alien Download rpm sudo alien --scripts --to-deb avg75flm-r45a0973.i386.rpm avg75flm_r45-1_i386.deb Coverts to deb generated Install Debian package sudo dpkg --install avg75flm_r45-1_i386.deb
APT Tools
aptitude install package-name
Installs a package
APT Tools
Updates the list of available packages from the apt sources Upgrades installed packages to the most recent versions.
aptitude safe-upgrade
The safest way to upgrade is to use the action 'safe-upgrade'. The new action will upgrade a package only if it does not impact other packages, i-e: if it is necessary to add or remove a dependency package during upgrade, safe-upgrade won't upgrade
aptitude full-upgrade
APT Tools
Upgrades installed packages to the most recent versions. aptitude will upgrade to the latest version of a package even if it is necessary to add or remove dependencies.
aptitude clean
Deletes packages in the APT cache.
APT Tools
apt-cache search keyword
Searches for packages that match a keyword
Repositories
Sites where packages can be downloaded /etc/apt/sources.list # comment deb executable deb-src source code
dpkg
Monitors which software packages are installed Location of packages Dependencies Will not download packages from a repository dpkg --list packagename.deb
Information about packages
dpkg
dpkg --status packagename
Displays information about an installed package
To register, double-click network alert icon on panel To configure, right-click alert icon