| Next
Previous
Contents 
 
 
 
 You'll use this file browser every day, so I'll give you a couple of tips to
use it at best. First of all, ask your sysadm to configure lessso as
it can display not only plain text files, but also compressed files,
archives, and so on. Like recent versions of TYPE,lesslets you browse files
in both directions. It also accepts several commands that are issued
pressing a key. The most useful are: 
 
 first of all, press qto leave the browser; hgives you extensive help; gto go to beginning of file,Gto the end, number+gto go to line `number' (e.g.125g), number+%to move to that
percentage of the file; /patternsearches forwards for `pattern';nsearches
forwards for the next match;?patternandNsearch backwards; m+letter marks current position (e.g.ma);'+letter go
to the marked position. :eexamines a new file; !commandexecutes the shell command. 
 
 
 Alas, Linux doesn't still support file version numbers, but you overcome
this limitation in two ways. The first is to use RCS, the Revision Control
System, which allows you to keep previous versions of a file. RCS is
covered in ``The RCS MINI-HOWTO'' (
http://sunsite.unc.edu/mdw/HOWTO/mini/RCS.html).
 The second way is to use an editor that knows how to deal with numbered
backups; emacsandjedare OK. Inemacs, add
these lines in your.emacs: 
 
(setq version-control t)
(setq kept-new-versions 15) ;;; or any other value
(setq kept-old-versions 15)
(setq backup-by-copying-when-linked t)
(setq backup-by-copying-when-mismatch t)
 In jed, make sure you have version 0.98.7 or newer; the patch for
numbered backups is available on 
http://ibogeo.df.unibo.it/guido/slang/backups.sl . 
 
 
 Under UNIX there are some widely used applications to archive and
compress files. taris used to make archives, that is collections of
files. To make a new archive: 
 
$ tar -cvf <archive_name.tar> <file> [file...]
 To extract files from an archive:
 
 
$ tar -xpvf <archive_name.tar> [file...]
 To list the contents of an archive:
 
 
$ tar -tf <archive_name.tar> | less
 Files can be compressed to save disk space using compress, which is
obsolete and shouldn't be used any more, orgzip: 
 
$ compress <file>
$ gzip <file>
 that creates a compressed file with extension .Z (compress) or .gz
(gzip). These programs don't make archives, but compress files
individually. To decompress, use: 
 
$ compress -d <file.Z>
$ gzip -d <file.gz>
 RMP.
 The unarj,zipandunziputilities are also available. Files
with extension.tar.gzor.tgz(archived withtar, then
compressed withgzip) are very common in the UNIX world. Here's how to
list the contents of a.tar.gzarchive: 
 
$ tar -ztf <file.tar.gz> | less
 To extract the files from a .tar.gzarchive: 
 
$ tar -zxf <file.tar.gz>
 
 
 Next
Previous
Contents
 |