$tar->add_files('file/foo.pl', 'docs/readme'); $tar->add_data('file/baz.txt', 'This is the contents now');

Size: px
Start display at page:

Download "$tar->add_files('file/foo.pl', 'docs/readme'); $tar->add_data('file/baz.txt', 'This is the contents now');"

Transcription

1 NAME SYNOPSIS Archive::Tar - module for manipulations of tar archives use Archive::Tar; my $tar = Archive::Tar->new; $tar->read('origin.tgz'); $tar->extract(); $tar->add_files('file/foo.pl', 'docs/readme'); $tar->add_data('file/baz.txt', 'This is the contents now'); $tar->rename('oldname', 'new/file/name'); $tar->chown('/', 'root'); $tar->chown('/', 'root:root'); $tar->chmod('/tmp', '1777'); $tar->write('files.tar'); $tar->write('files.tgz', COMPRESS_GZIP); $tar->write('files.tbz', COMPRESS_BZIP); # plain tar # gzip compressed # bzip2 compressed DESCRIPTION Archive::Tar provides an object oriented mechanism for handling tar files. It provides class methods for quick and easy files handling while also allowing for the creation of tar file objects for custom manipulation. If you have the IO::Zlib module installed, Archive::Tar will also support compressed or gzipped tar files. An object of class Archive::Tar represents a.tar(.gz) archive full of files and things. Object Methods Archive::Tar->new( [$file, $compressed] ) Returns a new Tar object. If given any arguments, new() calls the read() method automatically, passing on the arguments provided to the read() method. If new() is invoked with arguments and the read() method fails for any reason, new() returns undef. $tar->read ( $filename $handle, [$compressed, {opt => 'val'}] ) Read the given tar file into memory. The first argument can either be the name of a file or a reference to an already open filehandle (or an IO::Zlib object if it's compressed) The read will replace any previous content in $tar! The second argument may be considered optional, but remains for backwards compatibility. Archive::Tar now looks at the file magic to determine what class should be used to open the file and will transparently Do The Right Thing. Archive::Tar will warn if you try to pass a bzip2 compressed file and the IO::Zlib / IO::Uncompress::Bunzip2 modules are not available and simply return. Note that you can currently not pass a gzip compressed filehandle, which is not opened with IO::Zlib, a bzip2 compressed filehandle, which is not opened with IO::Uncompress::Bunzip2, nor a string containing the full archive information (either compressed or uncompressed). These are worth while features, but not currently implemented. See the TODO section. Page 1

2 The third argument can be a hash reference with options. Note that all options are case-sensitive. limit filter md5 Do not read more than limit files. This is useful if you have very big archives, and are only interested in the first few files. Can be set to a regular expression. Only files with names that match the expression will be read. Set to 1 and the md5sum of files will be returned (instead of file data) my $iter = Archive::Tar->iter( $file, 1, {md5 => 1} ); while( my $f = $iter->() ) { print $f->data. "\t". $f->full_path. $/; } extract If set to true, immediately extract entries when reading them. This gives you the same memory break as the extract_archive function. Note however that entries will not be read into memory, but written straight to disk. This means no Archive::Tar::File objects are created for you to inspect. All files are stored internally as Archive::Tar::File objects. Please consult the Archive::Tar::File documentation for details. Returns the number of files read in scalar context, and a list of Archive::Tar::File objects in list context. $tar->contains_file( $filename ) Check if the archive contains a certain file. It will return true if the file is in the archive, false otherwise. Note however, that this function does an exact match using eq on the full path. So it cannot compensate for case-insensitive file- systems or compare 2 paths to see if they would point to the same underlying file. $tar->extract( [@filenames] ) Write files whose names are equivalent to any of the names to disk, creating subdirectories as necessary. This might not work too well under VMS. Under MacPerl, the file's modification time will be converted to the MacOS zero of time, and appropriate conversions will be done to the path. However, the length of each element of the path is not inspected to see whether it's longer than MacOS currently allows (32 characters). If extract is called without a list of file names, the entire contents of the archive are extracted. Returns a list of filenames extracted. $tar->extract_file( $file, [$extract_path] ) Write an entry, whose name is equivalent to the file name provided to disk. Optionally takes a second parameter, which is the full native path (including filename) the entry will be written to. For example: $tar->extract_file( 'name/in/archive', 'name/i/want/to/give/it' ); $tar->extract_file( $at_file_object, 'name/i/want/to/give/it' ); Returns true on success, false on failure. Page 2

3 $tar->list_files( ) Returns a list of the names of all the files in the archive. If list_files() is passed an array reference as its first argument it returns a list of hash references containing the requested properties of each file. The following list of properties is supported: name, size, mtime (last modified date), mode, uid, gid, linkname, uname, gname, devmajor, devminor, prefix. Passing an array reference containing only one element, 'name', is special cased to return a list of names rather than a list of hash references, making it equivalent to calling list_files without arguments. $tar->get_files( [@filenames] ) Returns the Archive::Tar::File objects matching the filenames provided. If no filename list was passed, all Archive::Tar::File objects in the current Tar object are returned. Please refer to the Archive::Tar::File documentation on how to handle these objects. $tar->get_content( $file ) Return the content of the named file. $tar->replace_content( $file, $content ) Make the string $content be the content for the file named $file. $tar->rename( $file, $new_name ) Rename the file of the in-memory archive to $new_name. Note that you must specify a Unix path for $new_name, since per tar standard, all files in the archive must be Unix paths. Returns true on success and false on failure. $tar->chmod( $file, $mode ) Change mode of $file to $mode. Returns true on success and false on failure. $tar->chown( $file, $uname [, $gname] ) Change owner $file to $uname and $gname. Returns true on success and false on failure. $tar->remove (@filenamelist) $tar->clear Removes any entries with names matching any of the given filenames from the in-memory archive. Returns a list of Archive::Tar::File objects that remain. clear clears the current in-memory archive. This effectively gives you a 'blank' object, ready to be filled again. Note that clear only has effect on the object, not the underlying tarfile. $tar->write ( [$file, $compressed, $prefix] ) Write the in-memory archive to disk. The first argument can either be the name of a file or a reference to an already open filehandle (a GLOB reference). The second argument is used to indicate compression. You can either compress using gzip or bzip2. If you pass a digit, it's assumed to be the gzip compression level (between 1 and 9), but the use of constants is preferred: # write a gzip compressed file $tar->write( 'out.tgz', COMPRESS_GZIP ); Page 3

4 # write a bzip compressed file $tar->write( 'out.tbz', COMPRESS_BZIP ); Note that when you pass in a filehandle, the compression argument is ignored, as all files are printed verbatim to your filehandle. If you wish to enable compression with filehandles, use an IO::Zlib or IO::Compress::Bzip2 filehandle instead. The third argument is an optional prefix. All files will be tucked away in the directory you specify as prefix. So if you have files 'a' and 'b' in your archive, and you specify 'foo' as prefix, they will be written to the archive as 'foo/a' and 'foo/b'. If no arguments are given, write returns the entire formatted archive as a string, which could be useful if you'd like to stuff the archive into a socket or a pipe to gzip or something. ) Takes a list of filenames and adds them to the in-memory archive. The path to the file is automatically converted to a Unix like equivalent for use in the archive, and, if on MacOS, the file's modification time is converted from the MacOS epoch to the Unix epoch. So tar archives created on MacOS with Archive::Tar can be read both with tar on Unix and applications like suntar or Stuffit Expander on MacOS. Be aware that the file's type/creator and resource fork will be lost, which is usually what you want in cross-platform archives. Instead of a filename, you can also pass it an existing Archive::Tar::File object from, for example, another archive. The object will be clone, and effectively be a copy of the original, not an alias. Returns a list of Archive::Tar::File objects that were just added. $tar->add_data ( $filename, $data, [$opthashref] ) Takes a filename, a scalar full of data and optionally a reference to a hash with specific options. Will add a file to the in-memory archive, with name $filename and content $data. Specific properties can be set using $opthashref. The following list of properties is supported: name, size, mtime (last modified date), mode, uid, gid, linkname, uname, gname, devmajor, devminor, prefix, type. (On MacOS, the file's path and modification times are converted to Unix equivalents.) Valid values for the file type are the following constants defined by Archive::Tar::Constant: FILE Regular file. HARDLINK SYMLINK CHARDEV BLOCKDEV Hard and symbolic ("soft") links; linkname should specify target. Character and block devices. devmajor and devminor should specify the major and minor device numbers. DIR FIFO Directory. FIFO (named pipe). Page 4

5 SOCKET Socket. Returns the Archive::Tar::File object that was just added, or undef on failure. $tar->error( [$BOOL] ) Returns the current error string (usually, the last error reported). If a true value was specified, it will give the Carp::longmess equivalent of the error, in effect giving you a stacktrace. For backwards compatibility, this error is also available as $Archive::Tar::error although it is much recommended you use the method call instead. $tar->setcwd( $cwd ); Archive::Tar needs to know the current directory, and it will run Cwd::cwd() every time it extracts a relative entry from the tarfile and saves it in the file system. (As of version 1.30, however, Archive::Tar will use the speed optimization described below automatically, so it's only relevant if you're using extract_file()). Since Archive::Tar doesn't change the current directory internally while it is extracting the items in a tarball, all calls to Cwd::cwd() can be avoided if we can guarantee that the current directory doesn't get changed externally. To use this performance boost, set the current directory via use Cwd; $tar->setcwd( cwd() ); once before calling a function like extract_file and Archive::Tar will use the current directory setting from then on and won't call Cwd::cwd() internally. To switch back to the default behaviour, use $tar->setcwd( undef ); and Archive::Tar will call Cwd::cwd() internally again. If you're using Archive::Tar's extract() method, setcwd() will be called for you. Class Methods Archive::Tar->create_archive($file, Creates a tar file from the list of files provided. The first argument can either be the name of the tar file to create or a reference to an open file handle (e.g. a GLOB reference). The second argument is used to indicate compression. You can either compress using gzip or bzip2. If you pass a digit, it's assumed to be the gzip compression level (between 1 and 9), but the use of constants is preferred: # write a gzip compressed file Archive::Tar->create_archive( 'out.tgz', ); # write a bzip compressed file Archive::Tar->create_archive( 'out.tbz', ); Note that when you pass in a filehandle, the compression argument is ignored, as all files are printed verbatim to your filehandle. If you wish to enable compression with filehandles, use an IO::Zlib or IO::Compress::Bzip2 filehandle instead. The remaining arguments list the files to be included in the tar file. These files must all exist. Any files Page 5

6 which don't exist or can't be read are silently ignored. If the archive creation fails for any reason, create_archive will return false. Please use the error method to find the cause of the failure. Note that this method does not write on the fly as it were; it still reads all the files into memory before writing out the archive. Consult the FAQ below if this is a problem. Archive::Tar->iter( $filename, [ $compressed, {opt => $val} ] ) Returns an iterator function that reads the tar file without loading it all in memory. Each time the function is called it will return the next file in the tarball. The files are returned as Archive::Tar::File objects. The iterator function returns the empty list once it has exhausted the files contained. The second argument can be a hash reference with options, which are identical to the arguments passed to read(). Example usage: my $next = Archive::Tar->iter( "example.tar.gz", 1, {filter => qr/\.pm$/} ); while( my $f = $next->() ) { print $f->name, "\n"; $f->extract or warn "Extraction failed"; } #... Archive::Tar->list_archive($file, $compressed, [\@properties]) Returns a list of the names of all the files in the archive. The first argument can either be the name of the tar file to list or a reference to an open file handle (e.g. a GLOB reference). If list_archive() is passed an array reference as its third argument it returns a list of hash references containing the requested properties of each file. The following list of properties is supported: full_path, name, size, mtime (last modified date), mode, uid, gid, linkname, uname, gname, devmajor, devminor, prefix, type. See Archive::Tar::File for details about supported properties. Passing an array reference containing only one element, 'name', is special cased to return a list of names rather than a list of hash references. Archive::Tar->extract_archive($file, $compressed) Extracts the contents of the tar file. The first argument can either be the name of the tar file to create or a reference to an open file handle (e.g. a GLOB reference). All relative paths in the tar file will be created underneath the current working directory. extract_archive will return a list of files it extracted. If the archive extraction fails for any reason, extract_archive will return false. Please use the error method to find the cause of the failure. $bool = Archive::Tar->has_io_string Returns true if we currently have IO::String support loaded. Either IO::String or perlio support is needed to support writing stringified archives. Currently, perlio is the preferred method, if available. Page 6

7 See the GLOBAL VARIABLES section to see how to change this preference. $bool = Archive::Tar->has_perlio Returns true if we currently have perlio support loaded. This requires perl-5.8 or higher, compiled with perlio Either IO::String or perlio support is needed to support writing stringified archives. Currently, perlio is the preferred method, if available. See the GLOBAL VARIABLES section to see how to change this preference. $bool = Archive::Tar->has_zlib_support Returns true if Archive::Tar can extract zlib compressed archives $bool = Archive::Tar->has_bzip2_support Returns true if Archive::Tar can extract bzip2 compressed archives Archive::Tar->can_handle_compressed_files A simple checking routine, which will return true if Archive::Tar is able to uncompress compressed archives on the fly with IO::Zlib and IO::Compress::Bzip2 or false if not both are installed. You can use this as a shortcut to determine whether Archive::Tar will do what you think before passing compressed archives to its read method. GLOBAL VARIABLES $Archive::Tar::FOLLOW_SYMLINK Set this variable to 1 to make Archive::Tar effectively make a copy of the file when extracting. Default is 0, which means the symlink stays intact. Of course, you will have to pack the file linked to as well. This option is checked when you write out the tarfile using write or create_archive. This works just like /bin/tar's -h option. $Archive::Tar::CHOWN By default, Archive::Tar will try to chown your files if it is able to. In some cases, this may not be desired. In that case, set this variable to 0 to disable chown-ing, even if it were possible. The default is 1. $Archive::Tar::CHMOD By default, Archive::Tar will try to chmod your files to whatever mode was specified for the particular file in the archive. In some cases, this may not be desired. In that case, set this variable to 0 to disable chmod-ing. The default is 1. $Archive::Tar::SAME_PERMISSIONS When, $Archive::Tar::CHMOD is enabled, this setting controls whether the permissions on files from the archive are used without modification of if they are filtered by removing any setid bits and applying the current umask. The default is 1 for the root user and 0 for normal users. $Archive::Tar::DO_NOT_USE_PREFIX By default, Archive::Tar will try to put paths that are over 100 characters in the prefix field of your tar header, as defined per POSIX-standard. However, some (older) tar programs do not implement this spec. To retain compatibility with these older or non-posix compliant versions, you Page 7

8 can set the $DO_NOT_USE_PREFIX variable to a true value, and Archive::Tar will use an alternate way of dealing with paths over 100 characters by using the GNU Extended Header feature. Note that clients who do not support the GNU Extended Header feature will not be able to read these archives. Such clients include tars on Solaris, Irix and AIX. The default is 0. $Archive::Tar::DEBUG Set this variable to 1 to always get the Carp::longmess output of the warnings, instead of the regular carp. This is the same message you would get by doing: $tar->error(1); Defaults to 0. $Archive::Tar::WARN Set this variable to 0 if you do not want any warnings printed. Personally I recommend against doing this, but people asked for the option. Also, be advised that this is of course not threadsafe. Defaults to 1. $Archive::Tar::error Holds the last reported error. Kept for historical reasons, but its use is very much discouraged. Use the error() method instead: warn $tar->error unless $tar->extract; Note that in older versions of this module, the error() method would return an effectively global value even when called an instance method as above. This has since been fixed, and multiple instances of Archive::Tar now have separate error strings. $Archive::Tar::INSECURE_EXTRACT_MODE This variable indicates whether Archive::Tar should allow files to be extracted outside their current working directory. Allowing this could have security implications, as a malicious tar archive could alter or replace any file the extracting user has permissions to. Therefor, the default is to not allow insecure extractions. If you trust the archive, or have other reasons to allow the archive to write files outside your current working directory, set this variable to true. Note that this is a backwards incompatible change from version 1.36 and before. $Archive::Tar::HAS_PERLIO This variable holds a boolean indicating if we currently have perlio support loaded. This will be enabled for any perl greater than 5.8 compiled with perlio. If you feel strongly about disabling it, set this variable to false. Note that you will then need IO::String installed to support writing stringified archives. Don't change this variable unless you really know what you're doing. $Archive::Tar::HAS_IO_STRING This variable holds a boolean indicating if we currently have IO::String support loaded. This will be enabled for any perl that has a loadable IO::String module. If you feel strongly about disabling it, set this variable to false. Note that you will then need perlio Page 8

9 support from your perl to be able to write stringified archives. Don't change this variable unless you really know what you're doing. $Archive::Tar::ZERO_PAD_NUMBERS This variable holds a boolean indicating if we will create zero padded numbers for size, mtime and checksum. The default is 0, indicating that we will create space padded numbers. Added for compatibility with busybox implementations. Tuning the way RESOLVE_SYMLINK will works You can tune the behaviour by setting the $Archive::Tar::RESOLVE_SYMLINK variable, or $ENV{PERL5_AT_RESOLVE_SYMLINK} before loading the module Archive::Tar. Values can be one of the following: none (<1.88) Disable this mechanism and failed as it was in previous version speed (default) If you prefer speed this will read again the whole archive using read() so all entries will be available memory If you prefer memory Limitation It won't work for terminal, pipe or sockets or every non seekable source. FAQ What's the minimum perl version required to run Archive::Tar? You will need perl version 5.005_03 or newer. Isn't Archive::Tar slow? Yes it is. It's pure perl, so it's a lot slower then your /bin/tar However, it's very portable. If speed is an issue, consider using /bin/tar instead. Isn't Archive::Tar heavier on memory than /bin/tar? Yes it is, see previous answer. Since Compress::Zlib and therefore IO::Zlib doesn't support seek on their filehandles, there is little choice but to read the archive into memory. This is ok if you want to do in-memory manipulation of the archive. If you just want to extract, use the extract_archive class method instead. It will optimize and write to disk immediately. Another option is to use the iter class method to iterate over the files in the tarball without reading them all in memory at once. Can you lazy-load data instead? In some cases, yes. You can use the iter class method to iterate over the files in the tarball without reading them all in memory at once. Page 9

10 How much memory will an X kb tar file need? Probably more than X kb, since it will all be read into memory. If this is a problem, and you don't need to do in memory manipulation of the archive, consider using the iter class method, or /bin/tar instead. What do you do with unsupported filetypes in an archive? Unix has a few filetypes that aren't supported on other platforms, like Win32. If we encounter a hardlink or symlink we'll just try to make a copy of the original file, rather than throwing an error. This does require you to read the entire archive in to memory first, since otherwise we wouldn't know what data to fill the copy with. (This means that you cannot use the class methods, including iter on archives that have incompatible filetypes and still expect things to work). For other filetypes, like chardevs and blockdevs we'll warn that the extraction of this particular item didn't work. I'm using WinZip, or some other non-posix client, and files are not being extracted properly! By default, Archive::Tar is in a completely POSIX-compatible mode, which uses the POSIX-specification of tar to store files. For paths greater than 100 characters, this is done using the POSIX header prefix. Non-POSIX-compatible clients may not support this part of the specification, and may only support the GNU Extended Header functionality. To facilitate those clients, you can set the $Archive::Tar::DO_NOT_USE_PREFIX variable to true. See the GLOBAL VARIABLES section for details on this variable. Note that GNU tar earlier than version 1.14 does not cope well with the POSIX header prefix. If you use such a version, consider setting the $Archive::Tar::DO_NOT_USE_PREFIX variable to true. How do I extract only files that have property X from an archive? Sometimes, you might not wish to extract a complete archive, just the files that are relevant to you, based on some criteria. You can do this by filtering a list of Archive::Tar::File objects based on your criteria. For example, to extract only files that have the string foo in their title, you would use: $tar->extract( grep { $_->full_path =~ /foo/ } $tar->get_files ); This way, you can filter on any attribute of the files in the archive. Consult the Archive::Tar::File documentation on how to use these objects. How do I access.tar.z files? The Archive::Tar module can optionally use Compress::Zlib (via the IO::Zlib module) to access tar files that have been compressed with gzip. Unfortunately tar files compressed with the Unix compress utility cannot be read by Compress::Zlib and so cannot be directly accesses by Archive::Tar. If the uncompress or gunzip programs are available, you can use one of these workarounds to read.tar.z files from Archive::Tar Firstly with uncompress use Archive::Tar; open F, "uncompress -c $filename "; my $tar = Archive::Tar->new(*F);... Page 10

11 and this with gunzip use Archive::Tar; open F, "gunzip -c $filename "; my $tar = Archive::Tar->new(*F);... Similarly, if the compress program is available, you can use this to write a.tar.z file use Archive::Tar; use IO::File; my $fh = new IO::File " compress -c >$filename"; my $tar = Archive::Tar->new();... $tar->write($fh); $fh->close ; How do I handle Unicode strings? Archive::Tar uses byte semantics for any files it reads from or writes to disk. This is not a problem if you only deal with files and never look at their content or work solely with byte strings. But if you use Unicode strings with character semantics, some additional steps need to be taken. For example, if you add a Unicode string like # Problem $tar->add_data('file.txt', "Euro: \x{20ac}"); then there will be a problem later when the tarfile gets written out to disk via $tar-write()>: Wide character in print at.../archive/tar.pm line The data was added as a Unicode string and when writing it out to disk, the :utf8 line discipline wasn't set by Archive::Tar, so Perl tried to convert the string to ISO-8859 and failed. The written file now contains garbage. For this reason, Unicode strings need to be converted to UTF-8-encoded bytestrings before they are handed off to add_data(): use Encode; my $data = "Accented character: \x{20ac}"; $data = encode('utf8', $data); $tar->add_data('file.txt', $data); A opposite problem occurs if you extract a UTF8-encoded file from a tarball. Using get_content() on the Archive::Tar::File object will return its content as a bytestring, not as a Unicode string. If you want it to be a Unicode string (because you want character semantics with operations like regular expression matching), you need to decode the UTF8-encoded content and have Perl convert it into a Unicode string: use Encode; my $data = $tar->get_content(); # Make it a Unicode string $data = decode('utf8', $data); Page 11

12 CAVEATS There is no easy way to provide this functionality in Archive::Tar, because a tarball can contain many files, and each of which could be encoded in a different way. The AIX tar does not fill all unused space in the tar archive with 0x00. This sometimes leads to warning messages from Archive::Tar. Invalid header block at offset nnn A fix for that problem is scheduled to be released in the following levels of AIX, all of which should be coming out in the 4th quarter of 2009: AIX 5.3 TL7 SP10 AIX 5.3 TL8 SP8 AIX 5.3 TL9 SP5 AIX 5.3 TL10 SP2 AIX 6.1 TL0 SP11 AIX 6.1 TL1 SP7 AIX 6.1 TL2 SP6 AIX 6.1 TL3 SP3 TODO The IBM APAR number for this problem is IZ50240 (Reported component ID: 5765G0300 / AIX 5.3). It is possible to get an ifix for that problem. If you need an ifix please contact your local IBM AIX support. Check if passed in handles are open for read/write Currently I don't know of any portable pure perl way to do this. Suggestions welcome. SEE ALSO Allow archives to be passed in as string Currently, we only allow opened filehandles or filenames, but not strings. The internals would need some reworking to facilitate stringified archives. Facilitate processing an opened filehandle of a compressed archive Currently, we only support this if the filehandle is an IO::Zlib object. Environments, like apache, will present you with an opened filehandle to an uploaded file, which might be a compressed archive. The GNU tar specification The PAX format specification The specification which tar derives from; A comparison of GNU and POSIX tar standards; GNU tar intends to switch to POSIX compatibility GNU Tar authors have expressed their intention to become completely POSIX-compatible; A Comparison between various tar implementations Lists known issues and incompatibilities; Page 12

13 AUTHOR This module by Jos Boumans Please reports bugs to ACKNOWLEDGEMENTS COPYRIGHT Thanks to Sean Burke, Chris Nandor, Chip Salzenberg, Tim Heaney, Gisle Aas, Rainer Tammer and especially Andrew Savige for their help and suggestions. This module is copyright (c) Jos Boumans All rights reserved. This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. Page 13

### build an Archive::Extract object ### my $ae = Archive::Extract->new( archive => 'foo.tgz' );

### build an Archive::Extract object ### my $ae = Archive::Extract->new( archive => 'foo.tgz' ); NAME SYNOPSIS Archive::Extract - A generic archive extracting mechanism use Archive::Extract; ### build an Archive::Extract object ### my $ae = Archive::Extract->new( archive => 'foo.tgz' ); ### extract

More information

This is a list of questions and answers about Unicode in Perl, intended to be read after perlunitut.

This is a list of questions and answers about Unicode in Perl, intended to be read after perlunitut. NAME Q and A perlunifaq - Perl Unicode FAQ This is a list of questions and answers about Unicode in Perl, intended to be read after perlunitut. perlunitut isn't really a Unicode tutorial, is it? No, and

More information

$crc = crc32_combine($crc1, $crc2, $len2); $adler = adler32_combine($adler1, $adler2, $len2);

$crc = crc32_combine($crc1, $crc2, $len2); $adler = adler32_combine($adler1, $adler2, $len2); NAME SYNOPSIS Compress::Raw::Zlib - Low-Level Interface to zlib compression library use Compress::Raw::Zlib ; ($d, $status) = new Compress::Raw::Zlib::Deflate( [OPT] ) ; $status = $d->deflate($input, $output)

More information

use IO::Uncompress::Gunzip qw(gunzip $GunzipError) ; my $status = gunzip $input => $output [,OPTS] or die "gunzip failed: $GunzipError\n";

use IO::Uncompress::Gunzip qw(gunzip $GunzipError) ; my $status = gunzip $input => $output [,OPTS] or die gunzip failed: $GunzipError\n; NAME SYNOPSIS IO::Uncompress::Gunzip - Read RFC 1952 files/buffers my $status = gunzip $input => $output [,OPTS] or die "gunzip failed: $GunzipError\n"; my $z = new IO::Uncompress::Gunzip $input [OPTS]

More information

my $z = new IO::Compress::Zip $output [,OPTS] or die "zip failed: $ZipError\n";

my $z = new IO::Compress::Zip $output [,OPTS] or die zip failed: $ZipError\n; NAME IO::Compress::Zip - Write zip files/buffers SYNOPSIS use IO::Compress::Zip qw(zip $ZipError) ; my $status = zip $input => $output [,OPTS] or die "zip failed: $ZipError\n"; my $z = new IO::Compress::Zip

More information

use IO::Uncompress::Gunzip qw(gunzip $GunzipError) ; my $status = gunzip $input => $output [,OPTS] or die "gunzip failed: $GunzipError\n";

use IO::Uncompress::Gunzip qw(gunzip $GunzipError) ; my $status = gunzip $input => $output [,OPTS] or die gunzip failed: $GunzipError\n; NAME SYNOPSIS IO::Uncompress::Gunzip - Read RFC 1952 files/buffers my $status = gunzip $input => $output [,OPTS] my $z = new IO::Uncompress::Gunzip $input [OPTS] $status = $z->read($buffer) $status = $z->read($buffer,

More information

IO::Uncompress::AnyInflate - Uncompress zlib-based (zip, gzip) file/buffer. use IO::Uncompress::AnyInflate qw(anyinflate $AnyInflateError) ;

IO::Uncompress::AnyInflate - Uncompress zlib-based (zip, gzip) file/buffer. use IO::Uncompress::AnyInflate qw(anyinflate $AnyInflateError) ; NAME SYNOPSIS IO::Uncompress::AnyInflate - Uncompress zlib-based (zip, gzip) file/buffer my $status = anyinflate $input => $output [,OPTS] or die "anyinflate failed: $AnyInflateError\n"; my $z = new IO::Uncompress::AnyInflate

More information

IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2 or lzop file/buffer

IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2 or lzop file/buffer NAME SYNOPSIS IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2 or lzop file/buffer ; use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) my $status = anyuncompress $input

More information

my $z = new IO::Compress::Gzip $output [,OPTS] or die "gzip failed: $GzipError\n";

my $z = new IO::Compress::Gzip $output [,OPTS] or die gzip failed: $GzipError\n; NAME IO::Compress::Gzip - Write RFC 1952 files/buffers SYNOPSIS use IO::Compress::Gzip qw(gzip $GzipError) ; my $status = gzip $input => $output [,OPTS] or die "gzip failed: $GzipError\n"; my $z = new

More information

use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;

use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ; NAME SYNOPSIS IO::Uncompress::RawInflate - Read RFC 1951 files/buffers my $status = rawinflate $input => $output [,OPTS] my $z = new IO::Uncompress::RawInflate $input [OPTS] $status = $z->read($buffer)

More information

use IO::Uncompress::Unzip qw(unzip $UnzipError) ; my $z = new IO::Uncompress::Unzip $input [OPTS] or die "unzip failed: $UnzipError\n";

use IO::Uncompress::Unzip qw(unzip $UnzipError) ; my $z = new IO::Uncompress::Unzip $input [OPTS] or die unzip failed: $UnzipError\n; NAME SYNOPSIS IO::Uncompress::Unzip - Read zip files/buffers my $status = unzip $input => $output [,OPTS] my $z = new IO::Uncompress::Unzip $input [OPTS] $status = $z->read($buffer) $status = $z->read($buffer,

More information

use IO::Uncompress::Unzip qw(unzip $UnzipError) ; my $z = new IO::Uncompress::Unzip $input [OPTS] or die "unzip failed: $UnzipError\n";

use IO::Uncompress::Unzip qw(unzip $UnzipError) ; my $z = new IO::Uncompress::Unzip $input [OPTS] or die unzip failed: $UnzipError\n; NAME SYNOPSIS IO::Uncompress::Unzip - Read zip files/buffers my $status = unzip $input => $output [,OPTS] my $z = new IO::Uncompress::Unzip $input [OPTS] $status = $z->read($buffer) $status = $z->read($buffer,

More information

This document describes version 2.07 of File::Path, released

This document describes version 2.07 of File::Path, released NAME VERSION SYNOPSIS File::Path - Create or remove directory trees This document describes version 2.07 of File::Path, released 2008-11-09. use File::Path qw(make_path remove_tree); make_path('foo/bar/baz',

More information

use IO::Compress::RawDeflate qw(rawdeflate $RawDeflateError) ;

use IO::Compress::RawDeflate qw(rawdeflate $RawDeflateError) ; NAME IO::Compress::RawDeflate - Write RFC 1951 files/buffers SYNOPSIS my $status = rawdeflate $input => $output [,OPTS] my $z = new IO::Compress::RawDeflate $output [,OPTS] $z->print($string); $z->printf($format,

More information

This document describes version 2.09 of File::Path, released

This document describes version 2.09 of File::Path, released NAME VERSION SYNOPSIS File::Path - Create or remove directory trees This document describes version 2.09 of File::Path, released 2013-01-17. use File::Path qw(make_path remove_tree); make_path('foo/bar/baz',

More information

1 Apache::File - advanced functions for manipulating

1 Apache::File - advanced functions for manipulating 1 1 Apache::File - advanced functions for manipulating files at the server side 1 11 Synopsis 11 Synopsis use Apache::File (); my $fh = Apache::File->new($filename); print $fh Hello ; $fh->close; my ($name,

More information

$bool = $obj->mk_aliases( # create an alias to an existing alias_name => 'method'); # method name

$bool = $obj->mk_aliases( # create an alias to an existing alias_name => 'method'); # method name NAME SYNOPSIS Object::Accessor - interface to create per object accessors ### using the object $obj = Object::Accessor->new; # create object $obj = Object::Accessor->new(@list); # create object with accessors

More information

my $full_path = can_run('wget') or warn 'wget is not installed!';

my $full_path = can_run('wget') or warn 'wget is not installed!'; NAME IPC::Cmd - finding and running system commands made easy SYNOPSIS use IPC::Cmd qw[can_run run]; my $full_path = can_run('wget') or warn 'wget is not installed!'; ### commands can be arrayrefs or strings

More information

my $full_path = can_run('wget') or warn 'wget is not installed!';

my $full_path = can_run('wget') or warn 'wget is not installed!'; NAME IPC::Cmd - finding and running system commands made easy SYNOPSIS use IPC::Cmd qw[can_run run run_forked]; my $full_path = can_run('wget') or warn 'wget is not installed!'; ### commands can be arrayrefs

More information

my $z = new IO::Compress::Zip $output [,OPTS] or die "zip failed: $ZipError\n";

my $z = new IO::Compress::Zip $output [,OPTS] or die zip failed: $ZipError\n; NAME IO::Compress::Zip - Write zip files/buffers SYNOPSIS use IO::Compress::Zip qw(zip $ZipError) ; my $status = zip $input => $output [,OPTS] my $z = new IO::Compress::Zip $output [,OPTS] $z->print($string);

More information

### build a File::Fetch object ### my $ff = File::Fetch->new(uri => 'http://some.where.com/dir/a.txt');

### build a File::Fetch object ### my $ff = File::Fetch->new(uri => 'http://some.where.com/dir/a.txt'); NAME File::Fetch - A generic file fetching mechanism SYNOPSIS use File::Fetch; ### build a File::Fetch object ### my $ff = File::Fetch->new(uri => 'http://some.where.com/dir/a.txt'); ### fetch the uri

More information

NAME SYNOPSIS. Perl version documentation - Compress::Zlib. Compress::Zlib - Interface to zlib compression library. use Compress::Zlib ;

NAME SYNOPSIS. Perl version documentation - Compress::Zlib. Compress::Zlib - Interface to zlib compression library. use Compress::Zlib ; NAME SYNOPSIS Compress::Zlib - Interface to zlib compression library use Compress::Zlib ; ($d, $status) = deflateinit( [OPT] ) ; $status = $d->deflate($input, $output) ; $status = $d->flush([$flush_type])

More information

This module provide a convenient way to create directories of arbitrary depth and to delete an entire directory subtree from the filesystem.

This module provide a convenient way to create directories of arbitrary depth and to delete an entire directory subtree from the filesystem. NAME VERSION SYNOPSIS File::Path - Create or remove directory trees This document describes version 2.12 of File::Path. use File::Path qw(make_path remove_tree); @created = make_path('foo/bar/baz', '/zug/zwang');

More information

use File::Find; find({ wanted => \&process, follow => 1 }, '.');

use File::Find; find({ wanted => \&process, follow => 1 }, '.'); NAME SYNOPSIS File::Find - Traverse a directory tree. find(\&wanted, @directories_to_search); sub wanted {... } finddepth(\&wanted, @directories_to_search); sub wanted {... } DESCRIPTION find({ wanted

More information

$ftp = Net::FTP->new("some.host.name", Debug => 0) or die "Cannot connect to some.host.name:

$ftp = Net::FTP->new(some.host.name, Debug => 0) or die Cannot connect to some.host.name: NAME Net::FTP - FTP Client class SYNOPSIS use Net::FTP; $ftp = Net::FTP->new("some.host.name", Debug => 0) or die "Cannot connect to some.host.name: $@"; $ftp->login("anonymous",'-anonymous@') or die "Cannot

More information

Be sure to read ENCODING if your Pod contains non-ascii characters.

Be sure to read ENCODING if your Pod contains non-ascii characters. NAME Pod::Simple - framework for parsing Pod SYNOPSIS TODO DESCRIPTION Pod::Simple is a Perl library for parsing text in the Pod ("plain old documentation") markup language that is typically used for writing

More information

use Pod::Man; my $parser = Pod::Man->new (release => $VERSION, section => 8);

use Pod::Man; my $parser = Pod::Man->new (release => $VERSION, section => 8); NAME SYNOPSIS Pod::Man - Convert POD data to formatted *roff input use Pod::Man; my $parser = Pod::Man->new (release => $VERSION, section => 8); # Read POD from STDIN and write to STDOUT. $parser->parse_file

More information

GNU CPIO September by Robert Carleton and Sergey Poznyakoff

GNU CPIO September by Robert Carleton and Sergey Poznyakoff GNU CPIO 2.12 12 September 2015 by Robert Carleton and Sergey Poznyakoff This manual documents GNU cpio (version 2.12, 12 September 2015). Copyright c 1995, 2001-2002, 2004, 2010, 2014-2015 Free Software

More information

Compress::Raw::Bzip2 - Low-Level Interface to bzip2 compression library

Compress::Raw::Bzip2 - Low-Level Interface to bzip2 compression library NAME SYNOPSIS Perl version 5.26.1 documentation - Compress::Raw::Bzip2 Compress::Raw::Bzip2 - Low-Level Interface to bzip2 compression library use Compress::Raw::Bzip2 ; my ($bz, $status) = new Compress::Raw::Bzip2

More information

This documentation is for people who want to download CPAN modules and install them on their own computer.

This documentation is for people who want to download CPAN modules and install them on their own computer. NAME DESCRIPTION PREAMBLE perlmodinstall - Installing CPAN Modules You can think of a module as the fundamental unit of reusable Perl code; see perlmod for details. Whenever anyone creates a chunk of Perl

More information

AutoArchive. Release 1.4.1

AutoArchive. Release 1.4.1 AutoArchive Release 1.4.1 Sep 23, 2017 Contents 1 Contents 1 1.1 Program Description........................................... 1 1.2 Operations Explained.......................................... 5 1.3

More information

Handling Ordinary Files

Handling Ordinary Files Handling Ordinary Files Unit 2 Sahaj Computer Solutions visit : projectsatsahaj.com 1 cat: Displaying and Creating Files cat is one of the most frequently used commands on Unix-like operating systems.

More information

use Log::Message private => 0, config => '/our/cf_file'; my $log = Log::Message->new( private => 1, level => 'log', config => '/my/cf_file', );

use Log::Message private => 0, config => '/our/cf_file'; my $log = Log::Message->new( private => 1, level => 'log', config => '/my/cf_file', ); NAME Log::Message - A generic message storing mechanism; SYNOPSIS use Log::Message private => 0, config => '/our/cf_file'; my $log = Log::Message->new( private => 1, => 'log', config => '/my/cf_file',

More information

The following functions are provided by the Digest::MD5 module. None of these functions are exported by default.

The following functions are provided by the Digest::MD5 module. None of these functions are exported by default. NAME SYNOPSIS Digest::MD5 - Perl interface to the MD5 Algorithm # Functional style use Digest::MD5 qw(md5 md5_hex md5_base64); $digest = md5($data); $digest = md5_hex($data); $digest = md5_base64($data);

More information

my $reply = $term->get_reply( prompt => 'What is your favourite colour?', choices => [qw blue red green ], default => blue, );

my $reply = $term->get_reply( prompt => 'What is your favourite colour?', choices => [qw blue red green ], default => blue, ); NAME SYNOPSIS Term::UI - Term::ReadLine UI made easy use Term::UI; use Term::ReadLine; my $term = Term::ReadLine->new('brand'); my prompt => 'What is your favourite colour?', choices => [qw blue red green

More information

rpaths Documentation Release 0.13 Remi Rampin

rpaths Documentation Release 0.13 Remi Rampin rpaths Documentation Release 0.13 Remi Rampin Aug 02, 2018 Contents 1 Introduction 1 2 Classes 3 2.1 Abstract classes............................................. 3 2.2 Concrete class Path............................................

More information

User Commands GZIP ( 1 )

User Commands GZIP ( 1 ) NAME gzip, gunzip, gzcat compress or expand files SYNOPSIS gzip [ acdfhllnnrtvv19 ] [ S suffix] [ name... ] gunzip [ acfhllnnrtvv ] [ S suffix] [ name... ] gzcat [ fhlv ] [ name... ] DESCRIPTION Gzip reduces

More information

Long Filename Specification

Long Filename Specification Long Filename Specification by vindaci fourth release First Release: November 18th, 1996 Last Update: January 6th, 1998 (Document readability update) Compatibility Long filename (here on forth referred

More information

COMP2100/2500 Lecture 17: Shell Programming II

COMP2100/2500 Lecture 17: Shell Programming II [ANU] [DCS] [COMP2100/2500] [Description] [Schedule] [Lectures] [Labs] [Homework] [Assignments] [COMP2500] [Assessment] [PSP] [Java] [Reading] [Help] COMP2100/2500 Lecture 17: Shell Programming II Summary

More information

AHHHHHHH!!!! NOT TESTING! Anything but testing! Beat me, whip me, send me to Detroit, but don t make me write tests!

AHHHHHHH!!!! NOT TESTING! Anything but testing! Beat me, whip me, send me to Detroit, but don t make me write tests! NAME DESCRIPTION Test::Tutorial - A tutorial about writing really basic tests AHHHHHHH!!!! NOT TESTING! Anything but testing! Beat me, whip me, send me to Detroit, but don t make me write tests! *sob*

More information

use Params::Check qw[check allow last_error];

use Params::Check qw[check allow last_error]; NAME SYNOPSIS Params::Check - A generic input parsing/checking mechanism. use Params::Check qw[check allow last_error]; sub fill_personal_info { my %hash = @_; my $x; my $tmpl = { firstname => { required

More information

Thrift specification - Remote Procedure Call

Thrift specification - Remote Procedure Call Erik van Oosten Revision History Revision 1.0 2016-09-27 EVO Initial version v1.1, 2016-10-05: Corrected integer type names. Small changes to section headers. Table of Contents 1.

More information

Chapter 1 - Introduction. September 8, 2016

Chapter 1 - Introduction. September 8, 2016 Chapter 1 - Introduction September 8, 2016 Introduction Overview of Linux/Unix Shells Commands: built-in, aliases, program invocations, alternation and iteration Finding more information: man, info Help

More information

$ftp = Net::FTP->new("some.host.name", Debug => 0) or die "Cannot connect to some.host.name:

$ftp = Net::FTP->new(some.host.name, Debug => 0) or die Cannot connect to some.host.name: NAME Net::FTP - FTP Client class SYNOPSIS use Net::FTP; $ftp = Net::FTP->new("some.host.name", Debug => 0) or die "Cannot connect to some.host.name: $@"; $ftp->login("anonymous",'-anonymous@') or die "Cannot

More information

pm_to_blib({ 'lib/foo/bar.pm' => 'blib/lib/foo/bar.pm' }); Handles the installing and uninstalling of perl modules, scripts, man pages, etc...

pm_to_blib({ 'lib/foo/bar.pm' => 'blib/lib/foo/bar.pm' }); Handles the installing and uninstalling of perl modules, scripts, man pages, etc... NAME ExtUtils::Install - install files from here to there SYNOPSIS use ExtUtils::Install; install({ 'blib/lib' => 'some/install/dir' } ); uninstall($packlist); VERSION 2.04 DESCRIPTION pm_to_blib({ 'lib/foo/bar.pm'

More information

package YourModule; require = = qw(munge frobnicate); # symbols to export on request

package YourModule; require = = qw(munge frobnicate); # symbols to export on request NAME SYNOPSIS Exporter - Implements default import method for modules In module YourModule.pm: require Exporter; @EXPORT_OK = qw(munge frobnicate); # symbols to export on request or use Exporter 'import';

More information

semidbm Documentation

semidbm Documentation semidbm Documentation Release 0.4.0 James Saryerwinnie Jr September 04, 2013 CONTENTS i ii semidbm is a pure python implementation of a dbm, which is essentially a persistent key value store. It allows

More information

# use a BEGIN block so we print our plan before MyModule is loaded BEGIN { plan tests => 14, todo => [3,4] }

# use a BEGIN block so we print our plan before MyModule is loaded BEGIN { plan tests => 14, todo => [3,4] } NAME SYNOPSIS Test - provides a simple framework for writing test scripts use strict; use Test; # use a BEGIN block so we print our plan before MyModule is loaded BEGIN { plan tests => 14, todo => [3,4]

More information

1. Introduction. 2. Scalar Data

1. Introduction. 2. Scalar Data 1. Introduction What Does Perl Stand For? Why Did Larry Create Perl? Why Didn t Larry Just Use Some Other Language? Is Perl Easy or Hard? How Did Perl Get to Be So Popular? What s Happening with Perl Now?

More information

Secondary Storage (Chp. 5.4 disk hardware, Chp. 6 File Systems, Tanenbaum)

Secondary Storage (Chp. 5.4 disk hardware, Chp. 6 File Systems, Tanenbaum) Secondary Storage (Chp. 5.4 disk hardware, Chp. 6 File Systems, Tanenbaum) Secondary Stora Introduction Secondary storage is the non volatile repository for (both user and system) data and programs. As

More information

Introduction. Secondary Storage. File concept. File attributes

Introduction. Secondary Storage. File concept. File attributes Introduction Secondary storage is the non-volatile repository for (both user and system) data and programs As (integral or separate) part of an operating system, the file system manages this information

More information

autodie - Replace functions with ones that succeed or die with lexical scope # Recommended: implies 'use autodie qw(:default)'

autodie - Replace functions with ones that succeed or die with lexical scope # Recommended: implies 'use autodie qw(:default)' NAME autodie - Replace functions with ones that succeed or die with lexical scope SYNOPSIS # Recommended: implies 'use autodie qw(:default)' use autodie qw(:all); # Recommended more: defaults and system/exec.

More information

Files (review) and Regular Expressions. Todd Kelley CST8207 Todd Kelley 1

Files (review) and Regular Expressions. Todd Kelley CST8207 Todd Kelley 1 Files (review) and Regular Expressions Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 midterms (Feb 11 and April 1) Files and Permissions Regular Expressions 2 Sobel, Chapter 6 160_pathnames.html

More information

@list = bsd_glob('*.[ch]'); $homedir = bsd_glob('~gnat', GLOB_TILDE GLOB_ERR);

@list = bsd_glob('*.[ch]'); $homedir = bsd_glob('~gnat', GLOB_TILDE GLOB_ERR); NAME File::Glob - Perl extension for BSD glob routine SYNOPSIS use File::Glob ':bsd_glob'; @list = bsd_glob('*.[ch]'); $homedir = bsd_glob('~gnat', GLOB_TILDE GLOB_ERR); if (GLOB_ERROR) { # an error occurred

More information

($d, $status) = new Compress::Raw::Zlib::Deflate( [OPT] )

($d, $status) = new Compress::Raw::Zlib::Deflate( [OPT] ) NAME SYNOPSIS Compress::Raw::Zlib - Low-Level Interface to zlib compression library use Compress::Raw::Zlib ; ($d, $status) = new Compress::Raw::Zlib::Deflate( [OPT] ) ; $status = $d->deflate($input, $output)

More information

By default, optional warnings are disabled, so any legacy code that doesn't attempt to control the warnings will work unchanged.

By default, optional warnings are disabled, so any legacy code that doesn't attempt to control the warnings will work unchanged. SYNOPSIS use warnings; no warnings; use warnings "all"; no warnings "all"; use warnings::register; if (warnings::enabled()) warnings::warn("some warning"); if (warnings::enabled("void")) warnings::warn("void",

More information

File: PLT File Format Libraries

File: PLT File Format Libraries File: PLT File Format Libraries Version 4.0 June 11, 2008 1 Contents 1 gzip Compression and File Creation 3 2 gzip Decompression 4 3 zip File Creation 6 4 tar File Creation 7 5 MD5 Message Digest 8 6 GIF

More information

FREEENGINEER.ORG. 1 of 6 11/5/15 8:31 PM. Learn UNIX in 10 minutes. Version 1.3. Preface

FREEENGINEER.ORG. 1 of 6 11/5/15 8:31 PM. Learn UNIX in 10 minutes. Version 1.3. Preface FREEENGINEER.ORG Learn UNIX in 10 minutes. Version 1.3 Preface This is something that I had given out to students (CAD user training) in years past. The purpose was to have on one page the basics commands

More information

rpaths Documentation Release 0.2 Remi Rampin

rpaths Documentation Release 0.2 Remi Rampin rpaths Documentation Release 0.2 Remi Rampin June 09, 2014 Contents 1 Introduction 1 2 Classes 3 2.1 Abstract classes............................................. 3 2.2 Concrete class Path............................................

More information

Lecture 3. Essential skills for bioinformatics: Unix/Linux

Lecture 3. Essential skills for bioinformatics: Unix/Linux Lecture 3 Essential skills for bioinformatics: Unix/Linux RETRIEVING DATA Overview Whether downloading large sequencing datasets or accessing a web application hundreds of times to download specific files,

More information

CS Unix Tools. Fall 2010 Lecture 8. Hussam Abu-Libdeh based on slides by David Slater. September 24, 2010

CS Unix Tools. Fall 2010 Lecture 8. Hussam Abu-Libdeh based on slides by David Slater. September 24, 2010 Fall 2010 Lecture 8 Hussam Abu-Libdeh based on slides by David Slater September 24, 2010 Compression & Archiving zip / unzip Compress and archive (bundle) files into a single file. A new compressed.zip

More information

Chapter 1 Getting Started

Chapter 1 Getting Started Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different

More information

7. Archiving and compressing 7.1 Introduction

7. Archiving and compressing 7.1 Introduction 7. Archiving and compressing 7.1 Introduction In this chapter, we discuss how to manage archive files at the command line. File archiving is used when one or more files need to be transmitted or stored

More information

Users and Groups. his chapter is devoted to the Users and Groups module, which allows you to create and manage UNIX user accounts and UNIX groups.

Users and Groups. his chapter is devoted to the Users and Groups module, which allows you to create and manage UNIX user accounts and UNIX groups. cameron.book Page 19 Monday, June 30, 2003 8:51 AM C H A P T E R 4 Users and Groups T his chapter is devoted to the Users and Groups module, which allows you to create and manage UNIX user accounts and

More information

An Introduction to Unix Power Tools

An Introduction to Unix Power Tools An to Unix Power Tools Randolph Langley Department of Computer Science Florida State University August 27, 2008 History of Unix Unix Today Command line versus graphical interfaces to COP 4342, Fall History

More information

print STDERR "This is a debugging message.\n";

print STDERR This is a debugging message.\n; NAME DESCRIPTION perlopentut - simple recipes for opening files and pipes in Perl Whenever you do I/O on a file in Perl, you do so through what in Perl is called a filehandle. A filehandle is an internal

More information

ExtUtils::MM_VMS - methods to override UN*X behaviour in ExtUtils::MakeMaker

ExtUtils::MM_VMS - methods to override UN*X behaviour in ExtUtils::MakeMaker NAME SYNOPSIS DESCRIPTION ExtUtils::MM_VMS - methods to override UN*X behaviour in ExtUtils::MakeMaker Do not use this directly. Instead, use ExtUtils::MM and it will figure out which MM_* class to use

More information

Saving Space mini HOWTO

Saving Space mini HOWTO Table of Contents...1 By Guido Gonzato, mailto:guido@ibogeo.df.unibo.it...1 1. Introduction...1 2. Software requirements...1 3. The procedure...1 4. A Real Life Example...1 5. The End...1 1. Introduction...1

More information

pairs unpairs pairkeys pairvalues pairfirst pairgrep pairmap

pairs unpairs pairkeys pairvalues pairfirst pairgrep pairmap NAME SYNOPSIS List::Util - A selection of general-utility list subroutines use List::Util qw( reduce any all none notall first max maxstr min minstr product sum sum0 pairs unpairs pairkeys pairvalues pairfirst

More information

Paranoid Penguin rsync, Part I

Paranoid Penguin rsync, Part I Paranoid Penguin rsync, Part I rsync makes efficient use of the network by only transferring the parts of files that are different from one host to the next. Here's how to use it securely. by Mick Bauer

More information

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one] Data and Computer Security (CMPD414) Lab II Topics: secure login, moving into HOME-directory, navigation on Unix, basic commands for vi, Message Digest This lab exercise is to be submitted at the end of

More information

perl -MO=Deparse[,-d][,-fFILE][,-p][,-q][,-l] [,-sletters][,-xlevel] prog.pl

perl -MO=Deparse[,-d][,-fFILE][,-p][,-q][,-l] [,-sletters][,-xlevel] prog.pl NAME SYNOPSIS DESCRIPTION OPTIONS B::Deparse - Perl compiler backend to produce perl code perl -MO=Deparse[,-d][,-fFILE][,-p][,-q][,-l] [,-sletters][,-xlevel] prog.pl B::Deparse is a backend module for

More information

Session: Shell Programming Topic: Additional Commands

Session: Shell Programming Topic: Additional Commands Lecture Session: Shell Programming Topic: Additional Commands Daniel Chang diff [-b][-i][-w] filename1 filename2 diff [-b][-i][-w] filename1 directory1 diff [-b][-i][-w][-r] directory1 directory2 Description:

More information

CptS 360 (System Programming) Unit 6: Files and Directories

CptS 360 (System Programming) Unit 6: Files and Directories CptS 360 (System Programming) Bob Lewis School of Engineering and Applied Sciences Washington State University Spring, 2019 Motivation Need to know your way around a filesystem. A properly organized filesystem

More information

Now applying :unique to lexical variables and to subroutines will result in a compilation error.

Now applying :unique to lexical variables and to subroutines will result in a compilation error. NAME DESCRIPTION perl591delta - what is new for perl v5.9.1 This document describes differences between the 5.9.0 and the 5.9.1 development releases. See perl590delta for the differences between 5.8.0

More information

Lab #1 Installing a System Due Friday, September 6, 2002

Lab #1 Installing a System Due Friday, September 6, 2002 Lab #1 Installing a System Due Friday, September 6, 2002 Name: Lab Time: Grade: /10 The Steps of Installing a System Today you will install a software package. Implementing a software system is only part

More information

You must build perl on VOS Release (or later) on an XA/R or Continuum platform.

You must build perl on VOS Release (or later) on an XA/R or Continuum platform. NAME SYNOPSIS README.vos - Perl for Stratus VOS Perl version 5.8.9 documentation - perlvos This file contains notes for building perl on the Stratus VOS operating system. Perl is a scripting or macro language

More information

My Favorite bash Tips and Tricks

My Favorite bash Tips and Tricks 1 of 6 6/18/2006 7:44 PM My Favorite bash Tips and Tricks Prentice Bisbal Abstract Save a lot of typing with these handy bash features you won't find in an old-fashioned UNIX shell. bash, or the Bourne

More information

CST8207: GNU/Linux Operating Systems I Lab Six Linux File System Permissions. Linux File System Permissions (modes) - Part 1

CST8207: GNU/Linux Operating Systems I Lab Six Linux File System Permissions. Linux File System Permissions (modes) - Part 1 Student Name: Lab Section: Linux File System Permissions (modes) - Part 1 Due Date - Upload to Blackboard by 8:30am Monday March 12, 2012 Submit the completed lab to Blackboard following the Rules for

More information

File Commands. Objectives

File Commands. Objectives File Commands Chapter 2 SYS-ED/Computer Education Techniques, Inc. 2: 1 Objectives You will learn: Purpose and function of file commands. Interrelated usage of commands. SYS-ED/Computer Education Techniques,

More information

Pod::Simple::HTMLBatch - convert several Pod files to several HTML files. perl -MPod::Simple::HTMLBatch -e 'Pod::Simple::HTMLBatch::go' in out

Pod::Simple::HTMLBatch - convert several Pod files to several HTML files. perl -MPod::Simple::HTMLBatch -e 'Pod::Simple::HTMLBatch::go' in out NAME SYNOPSIS DESCRIPTION Pod::Simple::HTMLBatch - convert several Pod files to several HTML files perl -MPod::Simple::HTMLBatch -e 'Pod::Simple::HTMLBatch::go' in out This module is used for running batch-conversions

More information

LAE 5.1. Release Notes. Version 1.0

LAE 5.1. Release Notes. Version 1.0 LAE 5.1 Release Notes Copyright THE CONTENTS OF THIS DOCUMENT ARE THE COPYRIGHT OF LIMITED. ALL RIGHTS RESERVED. THIS DOCUMENT OR PARTS THEREOF MAY NOT BE REPRODUCED IN ANY FORM WITHOUT THE WRITTEN PERMISSION

More information

Manual Shell Script Linux If Not Exist Directory Does

Manual Shell Script Linux If Not Exist Directory Does Manual Shell Script Linux If Not Exist Directory Does Bash can be configured to be POSIX-confor mant by default. and then a much longer manual available using info (usually they refer to the info page

More information

File: Racket File Format Libraries

File: Racket File Format Libraries File: Racket File Format Libraries Version 5.0.2 November 6, 2010 1 Contents 1 gzip Compression and File Creation 3 2 gzip Decompression 4 3 zip File Creation 6 4 tar File Creation 7 5 MD5 Message Digest

More information

File System Basics. Farmer & Venema. Mississippi State University Digital Forensics 1

File System Basics. Farmer & Venema. Mississippi State University Digital Forensics 1 File System Basics Farmer & Venema 1 Alphabet Soup of File Systems More file systems than operating systems Microsoft has had several: FAT16, FAT32, HPFS, NTFS, NTFS2 UNIX certainly has its share, in typical

More information

User Commands tar ( 1 )

User Commands tar ( 1 ) NAME tar create tape archives and add or extract files SYNOPSIS tar c [ bbeeffhiklnoppqvwx@ [0-7]] [block] [tarfile] [exclude-file] {-I include-file -C directory file file}... tar r [ bbeeffhiklnqvw@ [0-7]]

More information

Essential Skills for Bioinformatics: Unix/Linux

Essential Skills for Bioinformatics: Unix/Linux Essential Skills for Bioinformatics: Unix/Linux WORKING WITH COMPRESSED DATA Overview Data compression, the process of condensing data so that it takes up less space (on disk drives, in memory, or across

More information

Segmentation with Paging. Review. Segmentation with Page (MULTICS) Segmentation with Page (MULTICS) Segmentation with Page (MULTICS)

Segmentation with Paging. Review. Segmentation with Page (MULTICS) Segmentation with Page (MULTICS) Segmentation with Page (MULTICS) Review Segmentation Segmentation Implementation Advantage of Segmentation Protection Sharing Segmentation with Paging Segmentation with Paging Segmentation with Paging Reason for the segmentation with

More information

2 Installing the Software

2 Installing the Software INSTALLING 19 2 Installing the Software 2.1 Installation Remember the hour or two of slogging through software installation I promised (or warned) you about in the introduction? Well, it s here. Unless

More information

As of writing ( ) only the IBM XL C for AIX or IBM XL C/C++ for AIX compiler is supported by IBM on AIX 5L/6.1/7.1.

As of writing ( ) only the IBM XL C for AIX or IBM XL C/C++ for AIX compiler is supported by IBM on AIX 5L/6.1/7.1. NAME DESCRIPTION perlaix - Perl version 5 on IBM AIX (UNIX) systems This document describes various features of IBM's UNIX operating system AIX that will affect how Perl version 5 (hereafter just Perl)

More information

File: Racket File Format Libraries

File: Racket File Format Libraries File: Racket File Format Libraries Version 5.1 February 14, 2011 1 Contents 1 Convertible: Data-Conversion Protocol 3 2 gzip Compression and File Creation 4 3 gzip Decompression 5 4 zip File Creation 7

More information

These are instructions for building Perl under DOS (or w??), using DJGPP v2.03 or later. Under w95 long filenames are supported.

These are instructions for building Perl under DOS (or w??), using DJGPP v2.03 or later. Under w95 long filenames are supported. NAME perldos - Perl under DOS, W31, W95. SYNOPSIS DESCRIPTION These are instructions for building Perl under DOS (or w??), using DJGPP v2.03 or later. Under w95 long filenames are supported. Before you

More information

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (( )) (( )) [ x x ] cdc communications, inc. [ x x ] \ / presents... \ / (` ') (` ') (U) (U) Gibe's UNIX COMMAND Bible ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The latest file from the Cow's

More information

BACKING UP LINUX AND OTHER UNIX(- LIKE) SYSTEMS

BACKING UP LINUX AND OTHER UNIX(- LIKE) SYSTEMS BACKING UP LINUX AND OTHER UNIX(- LIKE) SYSTEMS There are two kinds of people: those who do regular backups and those who never had a hard drive failure Unknown. 1. Introduction The topic of doing backups

More information

See Types of Data Supported for information about the types of files that you can import into Datameer.

See Types of Data Supported for information about the types of files that you can import into Datameer. Importing Data When you import data, you import it into a connection which is a collection of data from different sources such as various types of files and databases. See Configuring a Connection to learn

More information

NAME optipng optimize Portable Network Graphics files. SYNOPSIS optipng [? h help] optipng [options...] files...

NAME optipng optimize Portable Network Graphics files. SYNOPSIS optipng [? h help] optipng [options...] files... NAME optipng optimize Portable Network Graphics files SYNOPSIS optipng [? h help] optipng [options...] files... DESCRIPTION OptiPNG shall attempt to optimize PNG files, i.e. reduce their size to a minimum,

More information

6.824 Lab 2: A concurrent web proxy

6.824 Lab 2: A concurrent web proxy Page 1 of 6 6.824 - Fall 2002 6.824 Lab 2: A concurrent web proxy Introduction In this lab assignment you will write an event-driven web proxy to learn how to build servers that support concurrency. For

More information

1 Apache2::ServerUtil - Perl API for Apache server

1 Apache2::ServerUtil - Perl API for Apache server Apache2::ServerUtil - Perl API for Apache server record utils 1 Apache2::ServerUtil - Perl API for Apache server record utils 1 Apache2::ServerUtil - Perl API for Apache server record utils 1 11 Synopsis

More information

Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX

Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX 15th Jan. 2000 / 3:55 am Part 1: Working with files and rights ------------------------------------- cp

More information

Who am I? I m a python developer who has been working on OpenStack since I currently work for Aptira, who do OpenStack, SDN, and orchestration

Who am I? I m a python developer who has been working on OpenStack since I currently work for Aptira, who do OpenStack, SDN, and orchestration Who am I? I m a python developer who has been working on OpenStack since 2011. I currently work for Aptira, who do OpenStack, SDN, and orchestration consulting. I m here today to help you learn from my

More information