
taskset | 463
Linux
Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
-W, --verify
Check archive for corruption after creation.
-X file, --exclude-from file
Consult file for list of files to exclude.
-Z, --compress, --uncompress
Compress files with compress before archiving them, or
uncompress them with uncompress before extracting them.
Examples
Create an archive of /bin and /usr/bin (c), show the command
working (v), and store on the tape in /dev/rmt0:
tar cvf /dev/rmt0 /bin /usr/bin
List the tape’s contents in a format like ls -l:
tar tvf /dev/rmt0
Extract the /bin directory:
tar xvf /dev/rmt0 /bin
Create an archive of the current directory and store it in a file
backup.tar:
tar cvf - `find . -print` > backup.tar
(The - tells tar to store the archive on standard output, which is
then redirected.)
Filter an archive through gzip, extracting the contents but leaving
the original file compressed:
tar xvfz chapters.tar.gz
taskset
taskset [options] [mask | list] [pid | command [args]]
taskset is used to retrieve or set the processor affinity mask of
either an existing process, given its PID, or to run a new a process,
given its command name, with a specified affinity mask. The Linux
scheduler will then honor the given affinity mask, ensuring that the
process in question runs only on allowed processors.
Options
-c, --cpu-list
The affinity mask