lfm / README

lfm - Last File Manager

:Author: Iñigo Serna, inigoserna AT telefonica DOT net

:Version: 2.0, September 3rd. 2007

:Home page:

:License: \(C\) 2001-7, Iñigo Serna

          This software has been realised under the `GPL License`__ version 3
          or later, read the COPYING_ file that comes with this package for
          more information. 

          There is NO WARRANTY.

:Last update: Mon Sep  3 22:50:48 2007

.. contents:: Table of Contents

**Last File Manager** is a simple but powerful file manager for the
UNIX console. It has been developed with the ol' good `Midnight
Commander`__ as model.

Some of the features you can find in *lfm*:

- console-based file manager for UNIX platforms
- 1-pane or 2-pane view
- bookmarks
- vfs for compressed files
- dialogs with entry completion
- fast access to a shell
- direct integration of find/grep, df and other tools
- tabs per pane
- color files by extension [Andrey Skvortsov]
- fast file viewer with text and binary modes
- ...and many others

From version 0.6 and up *lfm* package also contains **pyview**, a
text / hex file viewer to be used with or without *lfm*. 
Read README.pyview_ for more info about it.

Some screenshots:


  .. image:: lfm.png


  .. image:: pyview.png


Type `lfm --help` or `pyview --help` for a complete list of options.

Program preferences are saved in `~/.lfmrc` file.
When the program starts the first time, it tries to discover the location
of some apps in your system to configure *lfm* automatically, but it's not 
perfect, so you should take a look to the configuration (`General Menu [F9] 
-> Edit Configuration [c]`) and change it according to your preferences.

*Lfm* and *Pyview* are written in Python_ and require curses module.
It needs Python v2.3 or higher, it won't work with older versions.

Since version 0.90, *lfm* needs ncurses >= v5.x for the handling 
of terminal resizing.

All modern UNIX flavours (Linux, \*BSD, Solaris, etc) should run it without 
problems. If they appear please notify me.

Note that python curses module should be linked against ncursesw library 
(instead of ncurses) to get wide characters support. This is the usual case 
in later versions of Linux distributions, but maybe not the case in older 
Linux or other UNIX platforms. Thus, expect problems when using multibyte 
file names (f.e. UTF-8 or latin-1 encoded) if your curses module isn't 
compiled against ncursesw. Anyway, I hope this issue will disappear with new 
releases of those platforms, eventually.

Also, take a look at TODO_ file to see bugs and *not-implemented-yet* (tm) 

Download & Installation
.. sidebar:: Files: all versions
   :class: warning

   | Version |       File       |    Date    |
   |   2.0   | lfm-2.0.tar.gz_  | 2007/09/03 |
   |   1.0   |  Never released  |   ~2006    |
   |   0.92  |  Never released  |   ~2005    |
   |   0.91  | lfm-0.91.tar.gz_ | 2004/07/03 |
   |   0.90  |  Never released  |            |
   |   0.9   | lfm-0.9.tar.gz_  | 2002/09/05 |
   |   0.8   | lfm-0.8.tar.gz_  | 2002/03/04 |
   |   0.7   | lfm-0.7.tar.gz_  | 2001/11/30 |
   |   0.6   |  Never released  |            |
   |   0.5   | lfm-0.5.tar.gz_  | 2001/08/07 |
   |   0.4   | lfm-0.4.tar.gz_  | 2001/07/19 |

   Read about NEWS_ or ChangeLog_

'lfm' is very easy to install, just keep next steps:

1. Download sources_
2. Uncompress file
3. Build:
    `$ python build`
4. Install, as root:
    `# python install`
5. Run it:
    `$ lfm`

To let 'lfm' to change to panel's current directory after quiting with
`q`, `Q` or `F10` keys, you must add next code to `/etc/bashrc` or to
your `~/.bashrc`::

	/usr/bin/lfm "$*"		# type here full path to lfm script
	cd "`cat $LFMPATHFILE`"

If you don't use bash or csh shell, above lines could differ.

If you upgrade from any older versions, please remove first `~/.lfmrc` to 
regenerate a valid configuration as file format has changed. I advise you 
to make a backup copy before.

Also, note that some keys have changed since previous versions. 
Read carefully following section.

These are the complete list of key bindings:

+ **Movement**
    - cursor_up, k, K
    - cursor_down, j, J
    - previous page, backspace, Ctrl-B
    - next page, space, Ctrl-F
    - home, Ctrl-A: first file
    - end, Ctrl-E: last file
    - cursor_left: upper dir
    - cursor_right: enter dir / vfs
    - g, G: go to directory
    - Ctrl-S: go to file in current panel
    - 0..9: go to bookmark #
    - Ctrl-D, Ctrl-\\: select bookmark # from menu
    - b, B: set bookmark #

+ **Panes**
    - tab: other pane
    - .: toggle 1/2 panes
    - ,: Ctrl-U: change panes position (left->right, right->left)
    - =: show same directory in both panes

+ **Tabs**:
    - :: new tab
    - !: close tab
    - <: go to left tab
    - >: go to right tab

+ **Selections**
    - insert: select item and go to next file
    - +: select group
    - -: deselect group
    - \*: invert selection

+ **Files / Directories operations**
    - t, T: touch file
    - l, L: create link
    - Ctrl-L: edit link
    - F3: view file
    - F4: edit file
    - F5: copy file/dir/selection
    - F6: move file/dir/selection
    - F12: easy way to rename file/dir/selection
    - F7: make directory
    - F8, del: delete file/dir/selection
    - enter: execute file, enter dir / vfs or view 'specially' depending on the extension of the regular file. It is executed in a thread that can be stopped and captures output
    - i, I: show file info

+ **Other**
    - #: show directories size
    - s, S: sort files
    - /: find/grep files
    - @: do something on file. Output is not captured
    - Ctrl-O: open shell. Type 'exit' to return to lfm
    - Ctrl-T: tree
    - F2: file menu
        - @: do something on file(s)
        - i: file(s) info
        - p: change file permissions, owner, group
        - g: gzip/gunzip file(s)
        - b: bzip2/bunzip2 file(s)
        - x: uncompress .tar.gz, .tar.bz2, .zip, .rar
        - u: uncompress .tar.gz, etc in other panel
        - c: compress directory to .tar.gz
        - d: compress directory to .tar.bz2
        - z: compress directory to .zip
        - r: compress directory to .rar 
    - F9: general menu 
        - /: find/grep file
        - #: show directories size
        - s: sort files
        - t: tree
        - f: show filesystems info
        - o: open shell
        - c: edit configuration
        - r: regenerate programs
    - Ctrl-R: refresh screen
    - h, H, F1: help
    - q, Q, F10: exit changing to current path
    - Ctrl-Q: quit

+ Keys in *EntryLine* window:
    - up, down: historic
    - enter: return path
    - tab: change to next entry or button
    - Ctrl-T: complete
    - Ctrl-W: delete leftwards until / or beginning
    - Ctrl-D: delete all
    - left, right, home, end, backspace, del, insert, ...
    - Ctrl-C, ESC: quit

+ Keys in *SelectItem* window:
    - up, k, K
    - down, j, J
    - previous page, backspace, Ctrl-B
    - next page, space, Ctrl-F
    - home, Ctrl-A
    - end, Ctrl-E
    - Ctrl-S: go to file/dir
    - enter: return path
    - Ctrl-C, q, Q, ESC: quit

+ Keys in *Tree* panel:
    - down, j, K: down within current depth, without going out from directory
    - up, k, K: up within current depth, without going out from directory
    - previous page, backspace, Ctrl-B: same as up but page-size scroll
    - next page, space, Ctrl-F: same as down but page-size scroll
    - home, Ctrl-A: first directory
    - end, Ctrl-E: last directory
    - left: go out from directory
    - right: enter in directory
    - enter: return changing to directory
    - Ctrl-C, q, Q, F10, ESC: quit

You can navigate inside some special files (known as vfs files in lfm) just 
*entering into* them (press *enter* or *cursor_right* when the cursor bar is
over one of these files). By now, supported types are `.tar.gz`,
`.tar.bz2`, `.zip` and `.rar` files. 

The virtual directory name ('path_to_vfs_file#vfs/dir') is not propagated, so 
tmpdir (`/tmp/@6421.2/dir`) is showed in the copy/move/... dialogs or when
view/edit/... a file, but this is just an estetic issue.

When returning from one of such vfs files, a question dialog appears asking to
allow you to regenerate the vfs file and update all changes (i.e., it is 
compressed again, so it could be slow in some machines), but `lfm` checks if it 
can do first, to avoid waste of time. This behaviour (rebuild or not rebuild, ask 
it or not) can be modified in the configuration file. By default the question is
showed but it's set to *not regenerate vfs*.
In case of `panelize` vfs type (after find/grep), deleted / moved files
are not deleted / moved in real path.

Many many years ago I began to write a program like this in C, but after
some weeks of coding I never finished it... I'm too lazy, yes.
Then I saw the light and I started writing `lfm` to learn python_.

Code evolved and application got more and more features, used by many
people around the world on different UNIX systems.

But after the release of version 0.91 (June 2004) they were not more releases.
Not that I had stopped working on *lfm*, new code was written, tested,
rewritten again... silently... but different reasons made me to postpone public
releases... code refactoring, a new essential feature, source cleaning,
a wedding, a child, ahem... more code refactoring....

Anyway, from now on I'll do my best to release often.

Thanks are obviously due to the whole python community, specially to GvR 
(of course! ;-) and all the people who answered my questions in c.l.p.

It's a great pleasure to code in a language like this.

Alexei Gilchrist, for his cfm program from which I took some ideas.

Midnight Commander developers, whose program was the guide.

And also to all the people who have contributed with ideas, reporting
bugs and code over these years: Antoni Aloy, Sebastien Bacher, Witold
Bołt, Fabian Braennstroem, Ondrej Certik, Kevin Coyner, Tim Daneliuk,
Mike Dean, Christian Eichert, Steve Emms, Stephen R. Figgins, Ana
Beatriz Guerrero Lopez, Tjabo Kloppenburg, Zoran Kolic, Max Kutny,
Bartosz Oler, Piotr Ozarowski, Jerome Prudent, Mikhail Ramendik, Rod,
Daniel T. Schmitt, Robin Siebler, Andrey Skvortsov, Espartaco Smith,
Jörg Sonnenberger, Tim Terlegård, Edd Thompson, Walter van den Broek,
Alejandro Weil and many others...
You have made posible to run *lfm* in all those platforms!

.. _sources: lfm-2.0.tar.gz
.. _README.pyview: README.pyview.html
.. _ChangeLog: ChangeLog
.. _GPL:
.. _mc:
.. _python:
__ GPL_
__ mc_
.. _lfm-2.0.tar.gz: lfm-2.0.tar.gz
.. _lfm-0.91.tar.gz: lfm-0.91.tar.gz
.. _lfm-0.9.tar.gz: lfm-0.9.tar.gz
.. _lfm-0.8.tar.gz: lfm-0.8.tar.gz
.. _lfm-0.7.tar.gz: lfm-0.7.tar.gz
.. _lfm-0.5.tar.gz: lfm-0.5.tar.gz
.. _lfm-0.4.tar.gz: lfm-0.4.tar.gz