-
-
Notifications
You must be signed in to change notification settings - Fork 39
FAQ
- Why clifm?
- Numbers?
- Clear the screen
- Files creation
- Bookmarks
- Search/filter files
- Files selection
- File tags
- Opening applications
- Color schemes
- File previews
- Aliases
- Keybindings for custom commands
- The shell
- Tips for Windows users
People often asks how does clifm compare to other file managers. The answer is simple: it doesn't. And here's why.
Clifm is not so much about features (though it provides quite a lot of them), but about design, about the way in which you interact with your file system.
Most terminal file managers out there (if not all) are built using the TUI design principles, much like Midnight Commander
and Ranger
. But clifm is built rather based on the CLI design principles: do not navigate through a big menu of files, but just type it!, exactly as you do in your shell, but easier and faster.
For this reason, clifm does not need to be better: it's just different! 😉
For more information see the introductory section of our Wiki.
ELN: It stands for Entry List Number
. Each entry in the files list has its own number, which can be used as a shortcut to corresponding file. For example, to print file properties of the file whose ELN is 12
you can enter p 12
(the actual file name will be suggested next to the ELN; press Right to accept the suggestion). In the same way, to change to a directory or to open a file (with the default associated application) enter its ELN.
Files counter: The amount of files contained by a given directory
Workspace indicator: Clifm provides up to 8 workspaces, each with its own independent path. To switch workspaces use the ws
command. Example: ws 2
(to switch to the second workspace). Alt-[1-4] is also available.
Files creation, for both regular files and directories, is performed by the n
(or new
) command. A few examples:
Command | Description |
---|---|
n file |
Create an empty regular file named file
|
n dir/ |
Create a directory named dir 1
|
n file dir/ |
Both of the above at once |
1 If a file name ends with a slash, it is created as a directory, otherwise, as an empty regular file.
Parent directories are created automatically if they don't exist. For instance, if you run the command n dir/file
on an empty directory, the directory dir
will be automatically created before the regular file file
.
To clear the screen enter rf
(.
will also do the trick). You can also press Enter (on an empty line) or Ctrl-l.
Use the bm
command as follows: bm add FILENAME BOOKMARK_NAME
, say
bm add important_dir/ dir
in which case the directory important_dir
will be bookmarked as dir
. Then you can access your bookmark either as follows:
bm dir
# or
b:dir
Note that you can operate on your bookmarks as if there where any other file. For example, to select the bookmark named dir
use the s
command:
s b:dir
To list available bookmarks enter bm
or type b:<TAB>
(or bm <TAB>
).
For more information consult the bookmarks section.
Absolutely. You can filter files by name, MIME type, and file type. A few easy examples:
Command | Description |
---|---|
=<TAB> |
List all file types in the current directory |
=l<TAB> |
List all symbolic links in the current directory |
@<TAB> |
List all MIME types in the current directory |
@image<TAB> |
List all files whose MIME type matches image in the current directory |
*.pdf<TAB> |
List all file names ending with .pdf
|
/file* |
Print a list of all file names starting with file in the current directory |
For more information consult the file filters and the files search sections.
Easy. Just use the s
command. Examples:
Command | Description |
---|---|
s *.c |
Select files with .c extension |
s 1-12 |
Select files whose ELN's are 1 through 12 (the first 12 files) |
s t:pdf |
Select all files tagged as pdf
|
s *.c 1-12 t:pdf |
All of the above at once |
List selected files as follows: enter sb
or type s:<TAB>
.
To deselect files use the ds
command: ds *
to deselect all files, or ds <TAB>
to deselect selectively.
To operate on selected files use the sel
or s:
keywords. For example: p s:
to print file properties of all selected files. Type s:<TAB>
to operate on selected files selectively.
See the files selection page for more information.
Both selected and tagged files are marks set on files. However, and unlike selection, when you tag a file you place it under a specific category (or tag), say, docs
, important
, or work
(you can create as many tags as you like, and you can place as many files as you want under any of these tags).
A few basic tag operations:
Command | Description |
---|---|
tag new test |
Create a new (empty) tag named test
|
tag add *.xlsx :docs |
Tag all spreadsheet files as docs (the tag will be created if it doesn't exist) |
t:docs<TAB> (or tag list docs ) |
List all files tagged as docs
|
p t:docs |
Print properties of all files tagged as docs
|
p t:work<TAB> |
Selectively print properties of files tagged as work
|
tag untag :docs <TAB> |
Selectively untag files tagged as docs
|
tag del work |
Delete the tag work (i.e. untag all files tagged as work and remove the tag itself) |
For more information consult the tagging files section.
Let's say you want to open PDF files with Okular. The procedure is quite straightforward:
- Open the Mimelist file, where opening applications are defined:
mm edit
(or F6). - Search for the PDF section and place Okular as the first opening application:
X:.*/pdf$:okular;...
For more information see the resource opener section.
Contributed by theRoboxx
Either via the command line (--color-scheme=NAME
), permanent via the ColorScheme
option in the main configuration file, or temporary for preview purposes using the cs command, for instance,
cs mytheme
Enter cs
(or cs <TAB>
) to get a list of available color schemes.
By default, clifm ships several themes, though more can be found in our colors repository.
For more details and custom theming visit the wiki.
Use the alias import command. Example:
alias import ~/.bashrc
See the aliases section for more details.
Yes. If running in fzf-mode (default if fzf
is installed):
- Use the view command: enter
view
or press Alt+-. - You can also press TAB to browse files in the current directory, including previews.
For image previews consult the image previews section.
External commands are executed using an actual shell, say /bin/bash
. By default, clifm will check the SHELL environment variable, and, if not set, the passwd
database, looking for the default shell of the current user. However, you can force clifm to use whatever shell you like using the CLIFM_SHELL environment variable. For example:
CLIFM_SHELL="/bin/zsh" clifm
Note: Bear in mind that only shells defined in /etc/shells
are allowed.
Consult the keybindings section.
Windows' users who compiled clifm under Cygwin or MinGW might be confronted with a few challenges.
-
Clifm requires some external tooling, such as
find
,fzf
,cp
,rm
,ln
, andsh
. Butfind
might be a problem here, since Windows provides its own version (find.exe
), a rather primitive tool compared to the Unix version. Now, because the path to thisfind.exe
is set quite at the beginning of the PATH environment variable, we need to set a path to the Unix version before it, so that the Unix version will be found before the Windows version when calling this program:a) Create a directory, say
c:\usr\clifm\utils
.
b) Place a symbolic link here (namedfind.exe
) pointing to the Unixfind
implementation (probably prvided by Cygwin or MSYS).
c) Modify your PATH environment variable as follows:PATH=c:\usr\clifm\utils;%PATH%
Note: Keep in mind that this PATH variable will be inherited by all child processes executed by clifm.
- Creating symbolic links depends on most Windows machines on a local security policy which must be switched on manually. At least the MSYS implementation of
ln
(a program to create symbolic links) requires an environment variable (MSYS) to be set in order to work properly, that is, to unlock the Unix-like behavior:
MSYS="winsymlinks:native"
- For some purposes, like displaying different sections of the manual page (via F1, F2, and F3), clifm uses an external pager, like
more
,less
, orbat
. Set your preferred pager in the PAGER environment variable as follows:
PAGER=bat
Keep in mind that this application name must be found in the PATH
variable. See the point 1 above.
- Some Windows terminal emulators do not play nice with bold fonts, used by default by clifm to display directory names, among other things. Now, if your terminal emulator does not properly support bold fonts, this might lead to readability issues. In this case, it is better to tell clifm to disable bold fonts altogether via the
--no-bold
command line switch:
clifm.exe --no-bold %1 %2 %3 %4 %5 %6 %7 %8 %9
- In the same vein, clifm makes use of colors with a sophisticated shading algorithm. Now, since some Windows terminal emulators (like
ConEmu
and derivatives) are not able to handle some of these colors properly, we recommend rather usingmintty
andwt
(the Windows Terminal) to avoid these color problems.
It might quite convenient to implement all of the above tips using a batch file, say clifm.bat
, with this content:
@echo off
set PATH=c:\usr\clifm\utils;%PATH%
set PAGER=bat
set MSYS="winsymlinks:native"
c:\path\to\clifm.exe --no-bold %1 %2 %3 %4 %5 %6 %7 %8 %9
Now run clifm.bat
instead of clifm.exe
and you are done.
Thanks to @muellerto for compiling this useful list.
🤷♀️ The answer you're looking for isn't here? Please request it to be added to this FAQ page.
⬆ Top
📌 Wiki Home
⚡ CliFM Home
What is clifm?
Is it for me?
Main design and goals
Dependencies
Installation
Interface
Getting help
Configuration file
Command line options
Commands
Keybindings
FAQ
ELN (entry list number)
Navigation
Opening files
Sorting files
Filtering files
Basic file operations
Selection
Search
Bookmarks
Trash
Archives
File details/Long view
Basic usage examples
Workspaces
Directory jumper
Resource opener (file launcher)
Actions (plugins)
Autocommands
Profiles
Aliases
The prompt
TAB completion (with fzf integration)
Auto-suggestions
Syntax highlighting
File tags
File names cleaner
Fastback and backdir
Remote file systems management
Light mode
Read-only mode
Stealth mode (incognito)
Disk usage analyzer mode
Desktop notifications
Environment
Files
Security
Tiling WM's and terminal multiplexers
FZF mode for TAB completion
File previews
Bulk operations
Archiving
Virtual directories
cp/mv progress bar
Send files to Android device
Git integration
Wildcards and REGEX
Multiple instances
Icons
Plugins
Customization
CD on quit
Files picker
Files lister (ls-mode)
stat(1) replacement
Subshell notification