Categories
DailyOps

How to install a tiny and unobtrusive terminal file manager

Install a tiny and unobtrusive terminal file manager that will accompany you in your daily tasks.

Install nnn using package manager.

$ sudo apt install nnn

Display usage information.

$ nnn --help
usage: nnn [OPTIONS] [PATH]

The unorthodox terminal file manager.

positional args:
  PATH   start dir/file [default: .]

optional args:
 -a      auto NNN_FIFO
 -A      no dir auto-select
 -b key  open bookmark key (trumps -s/S)
 -c      cli-only NNN_OPENER (trumps -e)
 -C      earlier colorscheme
 -d      detail mode
 -D      dirs in context color
 -e      text in $VISUAL/$EDITOR/vi
 -E      use EDITOR for undetached edits
 -f      use readline history file
 -F      show fortune
 -g      regex filters [default: string]
 -H      show hidden files
 -J      no auto-proceed on select
 -K      detect key collision
 -l val  set scroll lines
 -n      type-to-nav mode
 -o      open files only on Enter
 -p file selection file [stdout if '-']
 -P key  run plugin key
 -Q      no quit confirmation
 -r      use advcpmv patched cp, mv
 -R      no rollover at edges
 -s name load session by name
 -S      persistent session
 -t secs timeout to lock
 -T key  sort order [a/d/e/r/s/t/v]
 -u      use selection (no prompt)
 -U      show user and group
 -V      show version
 -w      place HW cursor on hovered
 -x      notis, sel to clipboard, xterm title
 -h      show help

v4.0
BSD 2-Clause
https://github.com/jarun/nnn

Start file-manager.

$ nnn

Display help using ? character.

 NAVIGATION
         Up k  Up                PgUp ^U  Scroll up
         Dn j  Down              PgDn ^D  Scroll down
         Lt h  Parent            ~ ` @ -  HOME, /, start, last
     Ret Rt l  Open                    '  First file/match
         g ^A  Top                     .  Toggle hidden
         G ^E  End                     +  Toggle auto-advance
         b ^/  Bookmark key            ,  Mark CWD
          1-4  Context 1-4       (Sh)Tab  Cycle context
          Esc  Send to FIFO           ^L  Redraw
            Q  Pick/err, quit         ^G  QuitCD
            q  Quit context      2Esc ^Q  Quit
            ?  Help, conf
 FILTER & PROMPT
            /  Filter            Alt+Esc  Clear filter & redraw
          Esc  Exit prompt            ^L  Clear prompt/last filter
           ^N  Toggle type-to-nav 
 FILES
         o ^O  Open with...            n  Create new/link
         f ^F  File details            d  Detail mode toggle
           ^R  Rename/dup              r  Batch rename
            z  Archive                 e  Edit file
            *  Toggle exe              >  Export list
     Space ^J  (Un)select       m ^Space  Mark range/clear sel
            a  Select all              A  Invert sel
         p ^P  Copy sel here        w ^W  Cp/mv sel as
         v ^V  Move sel here           E  Edit sel
         x ^X  Delete
 MISC
        Alt ;  Select plugin           =  Launch app
         ! ^]  Shell                   ]  Cmd prompt
            c  Connect remote          u  Unmount remote/archive
         t ^T  Sort toggles            s  Manage session
            T  Set time type           0  Lock

VOLUME: 304.879G of 436.953G free

SELECTION FILE: /home/milosz/.config/nnn/.selection

v4.0
BSD 2-Clause
https://github.com/jarun/nnn

nnn is fast, unobtrusive and smoothly fits my workflow. The best part is that it nicely works with tmux, vim using nnn.vim, and provides its own plugins.