DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Console File Manager on Linux


"vi style" means use j/k to move cursor up/down, use h/l to move parent/child directory.

ranger

vi style console file manager. Install with sudo apt install ranger caca-utils highlight atool w3m poppler-utils mediainfo.

Run rifle to start the application.

Frequently Used Shortcuts

q: quit the application;

?m: see manpage; ?k list key shortcuts.

h/l: go to the parent/child folder;

H/L: go back/forward through navigation history;

gh: jump to $HOME;

r: open current file with a command you choose

C-h or zh: show/hide hidden files;

i: preview file in a pager, q to quit the pager;

E: edit file (with vim);

<delete> or :delete: delete file;

dd: cut file/folder;

pp: paste file/folder;

cw or I: rename a file/folder;

S: open a new shell, Ctrl-d to exit and back to ranger;

du: Measure disk usage of current directory;

zp & zc: toggle preview and preview window;

zm: toggle mouse input;

Configuration

Create default config files: ranger --copy-config=all.

Set 'show hidden files' as default: echo 'set show_hidden true' >> $HOME/.config/ranger/rc.conf.

If you open a file and it says "no action found", you can open it with r and specify a command. Ranger will remember the command. Next time you can open it directly with .

Similarly, if the editor is not what you want, you can always open the text file with r and use your favorite editor.

Bookmark

ranger's bookmark function is powerful and convenient. Mark a folder with mX, jump to this bookmark with 'X. After the single quote key is pressed, all defined bookmarks will be listed. There seems no commands for unset the bookmark, you can remove a bookmark entry ~/.config/ranger/bookmarks directly.

Ref: Installing and Using Ranger, a Terminal File Manager, on a Ubuntu VPS

vifm

vi style. Add "FILETYPE=PDF=pdf=exo-open" in ~/.vifm/vifmrc will open pdf file in background.

apt install vifm

TotalCommander 的身体,vi 的灵魂。

配置文件 ~/.vifm/vifmrc: [source]


" mobi filextype .mobi ebook-viewer %c %i & fileviewer .mobi ebook-viewer %c


Add the following codes into ~/.vifm/vifmrc:

nnoremap ; :
nnoremap : ;
vnoremap ; :
vnoremap : ;

结合快速跳转打开指定目录: [source]


z wikidata vifm .


常用操作:

返回上级目录:h 进入目录,或者打开文件:l 向上移动光标:k 向下移动光标:j 选中文件:v 复制文件:yy 粘贴文件:p 生成文件拷贝:C 删除文件:dd 预览文件内容:w 退出 vifm: :

Midnight Commander

Pro: Easy installation, easy custimization.

Cons: the keyboard shortcuts system is far from vi style.

Install and start:

apt install mc
mc

Keyboard shortcut list

Tab: jump between panes;

F5: copy file;

F10: quit mc;

Ctrl-o: jump between console and mc;

Insert: select files;



Published

Jul 12, 2013

Last Updated

Dec 25, 2019

Category

Tech

Tags

  • console 9
  • file explorer 2

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor