- Common Operations
- Table of contents
- Completions and suggestions
- File Operations
- Trashing files
- 1. General concepts
- 2. Operating on selected files
- 2.1 Operating on specific selected files
- 2.2 Deselecting files
- Tagging files
- 1. How Etiqueta works?
- 2. Handling file tags
- 3. Usage examples
- 4. Operating on tagged files
- 4.1 Operating on specific tagged files
- Search history
- File details
- Basic usage examples
File names cleaner
Remote file systems management
Disk usage analyzer mode
Tiling WM's and terminal multiplexers
FZF mode for TAB completion
cp/mv progress bar
Send files to Android device
Wildcards and REGEX
CD on quit
Files lister (ls-mode)
Clone this wiki locally
- Basic file operations
- Trashing files
- Selecting files
- Tagging files
- Searching files
- File details
- Basic usage examples
ELN is crucial for CliFM.1 It stands for
Entry List Number and could be used for any operation involving file names in the current directory. For example, given the following list of files:
we see that the ELN corresponding to the
Documents directory is
5. So, we can change to this directory either using its file name or its ELN:
Documents or just
5. TAB completion is available to automatically expand a given ELN into its corresponding file name (minimizing thus the chances of inadvertently operating on the wrong file(s)).
Documents is thus equivalent to entering just
5: both will
cd into the
Of course, any file operation (be it internal or external) could be used instead. For example:
to select the directory
to remove the directory
NOTE: In the case of internal commands, ELN's could be written fused to the command name, as in this case (
s5 indeed is equivalent to
s 5). However, this does not apply to external commands.
or, using now a shell, external command:
diff 5 6
to compare two files, in this case
ELN ranges are also understood:
Since ranges, just as ELN's, could be a bit tricky, TAB completion is available to make sure that this particular range actually includes the desired filenames.
1 As far as I know, the first file manager to implement this notion of
ELN (though not called as such), was nffm. The project is sadly no longer maintained.
For file names and ELN's, and ELN ranges TAB completion is available. The procedure is as straightforward as well known:
5 -> TAB ->
Doc -> TAB ->
If the auto-suggestions system is enabled,
Documents will be automatically printed (by default in an underlined cyan color) next to the current input string as you type. If the typed string refers to a file name, the suggestion will just complete the input string. When it comes to ELN's (like the
5 above), the file name corresponding to this ELN will be printed as follows:
5_ > Documents
where the underscore represents the current cursor position.
To accept the given suggestion, just press Right or Ctrl-f: the text typed so far will be automatically replaced by the corresponding suggestion.
For more information about the suggestions system, consult the suggestions page.
By default, and unlike the ls(1) shell command, CliFM lists files automatically for each entered directory (a feature know as
autols). To disable this function, run CliFM with the
-o, --no-autols option or set
false in the configuration file (F10).1
|Change directory to
||Alt-e / Home|
|Change to /||
||Shift-Left / Alt-j|
||Shift-Right / Alt-k|
|Reprint files in current directory||
||Enter / Ctrl-r|
|Go to parent directory||
||Shift-up / Alt-u|
|Jump to /some/deep/directory2||
|Go up 2 directories3||
|Change to pinned directory5||
|Change to mountpoint||
|Change to first visited directory||Ctrl-Alt-j|
|Change to last visited directory||Ctrl-Alt-k|
|Print directory history||
1 In the last years there have been some projects aimed to implement an
autols function on regular shells. See auto-ls.fish, autols, and auto-ls.
2 Only provided that
/some/deep/directory has been already visited and is in the jump database. See the jump section for more information.
3 Fastback function: Each dot (
.) after the first two dots means one more directory to go up. Thus, to go up four directories at once enter 5 dots:
4 Once in the bookmark screen, just enter the ELN corresponding to the desired file/directory or its shortcut. See the bookmarks section.
5 A directory must be already pinned. See the pin command.
NB: Whenever files and/or directories in the current directory are involved, they can be replaced by the corresponding ELN. So, supposing the ELN for
p myfile works the same as
p 12 (
p12, without space, works as well).
The URI file scheme for local file systems is also supported. For example,
file:///etc/hosts amounts to this:
|List trashed files||
|Restore (undelete) trashed files||
|Empty the trash can||
|Toggle executable bit on
|Select all files in the current directory||
|Deselect all selected files||
|Copy selected files into current directory||
|Copy selected files into
|Move selected files into current directory||
|Move selected files into
|Remove selected files||
|Trash selected files||
|Bulk rename selected files||
|Export selected files||
|Archive selected files||
|Open/change to last selected file||Ctrl-Alt-g|
|Bookmark last selected file||Ctrl-Alt-b|
1 Files are opened using the application associated to either the file name or the file's MIME type.
Lira, CliFM's built-in resource opener, is responsible for storing file associations and opening files with the appropriated program. For more information about
Lira see the Resource opener section.
2 For more information about these commands consult the corresponding description page.
CliFM implements a built-in and FreeDesktop compliant trash system.
|List trashed files||
|Permanently remove some trashed files2||
|Restore (undelete) all trashed files||Ctrl-Alt-u|
|Restore (undelete) some trashed files3||
|Empty the trash can||
1 Trashed files are stored in
2 The user will be presented with a screen to chose files to be removed from the trash can. TAB completion is also available:
t del TAB
3 The user will be presented with a screen to chose files to be restored to their original location. TAB completion is also available:
NOTE: In order to prevent accidental deletions, the remove command (r) could be instructed to always trash files instead of simply remove them. To achieve this use the
--trash-as-rm command line option or the
TrashAsRm option in the configuration file.
Three commands are used to control files selection:
||Deselect files. See the deselecting files section below|
||Print the content of the Selection Box|
The syntax of the
s command is this:
s, sel ELN/FILE ... n [[!]PATTERN] [-filetype] [:PATH]
If not in light mode,1 once a file is selected, and if the file is in the current working directory, the corresponding file name will be marked with an asterisk (colored according to the value of
li in the color scheme file (by default bold green)), at the left of the file name (and at the right of its ELN).
1 Selected files are tracked via device and inode numbers, obtained via a call to stat(3). But since in light mode all calls to this function are avoided for performance reasons, tracking selected files is not possible.
s command allows you to send one or multiple elements (either files or directories) to the
sel accepts individual elements, range of elements, say 1-6, file names and paths, just as wildcards (globbing) and regular expressions. Example:
s 1 4-10 ^r file* filename /path/to/filename
Just as in the search function, it is also possible to further filter the list of matches indicating the desired file type. For instance,
s ^ -d
will select all directories in the current working directory. For available file type filters consult the search section.
By default, the selection function operates on the current working directory. To select files in any other directory use the
:PATH expression. For example, to select all regular files with a
.conf extension in the
/etc directory, the command would be:
s .*\.conf$ -r :/etc
or using wildcards:
s *.conf -r :/etc
Just as in the case of the search function, inverse matching is supported for patterns, either wildcards or regular expressions. To invert or reverse the meaning and action of a pattern, just prepend an exclamation mark (
!). E.g., to select all non-hidden regular files in the
Documents directory, issue this command:
s !^\. -r :Documents
or, to select all directories in
/etc, except those ending with ".d":
s !*.d -d :/etc
Glob and regular expressions could be used together. For example:
s ^[r|R].*d$ /etc/*.conf
will select all files starting with either 'r' or 'R' and ending with 'd' in the current working directory, plus all
.conf files in the
/etc directory. However, this use is discouraged if both patterns refer to the same directory, since the second one will probably override the result of the first one.
It is important to note that glob expressions are evaluated before regular expressions, in such a way that any pattern that could be understood by both kinds of pattern matching mechanisms will be evaluated first according to the former, that is, as a glob expression. For example,
.*, as regular expression, should match all files. However, since glob expressions are evaluated first, it will only match hidden files. To select all files using a glob expression, try
.* *, or, with a regular expression:
(.*?). The keyboard shortcut Alt-a is also available to perform the same operation.
The Selection Box is accessible to different instances of the program, provided they use the same profile (see the profiles section). By default, indeed, each profile keeps a private Selection Box, being thus not accessible to other profiles. You can nonetheless modify this behavior via the
ShareSelbox option in the configuration file. If the
ShareSelbox option is enabled, selected files are stored in
/tmp/clifm/username/.selbox_profilename.cfm is used (this is the default).
sb command (or Alt-s) to show the entries currently contained in the
In order to operate on selected files the
sel keyword is used: indeed,
sel amounts to
all selected files. In this way, you can use the
sel keyword with any command, be it internal or external. For example:
to remove all selected files
ls -l sel
to print the properties of all selected files
If using the FZF mode for TAB completion, you can operate only on some selected files as follows:
The list of selected files will be displayed. Choose one or more of them (use TAB to mark entries) to operate only on those specific files. For example, to print the file properties of some specific selected files:
p sel<TAB>, select the files you want via TAB, press Enter or Right (marked files will be inserted into the command line), and the press Enter to run the command, as usual.
The fzfsel plugin (invoked via the
* action name) can be used as well:
* ls -l
The user will be prompted to mark some selected files (you need to install
FZF first), which then will be passed as parameters to the corresponding command, in this case
If you need to specify a specific position for marked selected files in your command, use the
%f placeholder as follows:
* cp %f /misc/docs
Marked selected files will be inserted in the place of
%f is not specified, marked files will be inserted at the end of your command.
There are several ways of deselecting files, all of them involving the
a. Just enter
ds: you'll be prompted to select files to be deselected. To deselect all selected files at once, enter
ds * or press Alt-d.
ds, and then press TAB: if using FZF for TAB completion, you'll see the list of currently selected files. Mark (using the TAB key) those files to be deselected and then press Enter.
c. Via the
fzfdesel plugin, bound by default to the
** action. To invoke this plugin, just enter
**. Here you can fuzzy search/filter selected files and easily mark those you want for deselection. You can mark individual files, all of them, just as invert the current selection. Once done, just press Enter.
NOTE: Given the flexibility of the
fzfdesel, you might want to replace the
ds command by this plugin. To do so, just edit the configuration file (F10 or
edit) and create the corresponding alias:
Etiqueta is CliFM's built-in files tagging system
File tags are created via symbolic links using an specific directory under the user's profile:
Every time a new tag is created, a new directory named as the tag itself is created in the
tags directory. Tagged files are just symbolic links (named as the full path of the target file and replacing slashes by colons) to the actual files created in the appropriate directory. For example, if you tag
work, a symbolic link to
home:USER:myfile.txt will be created in
Etiqueta itself takes care of expanding these symlinks, so that you, as a user, should not worry at all about this colons notation.
tag is the main
Etiqueta command and is used to handle file tags. Its syntax is as follows:
tag [ls, list] [new] [rm, remove] [mv, rename] [untag] [merge] [FILE(s)] [[:]TAG]
:TAG notation is used for commands taking both file and tag names:
tag FILES(s) :TAG ..., to tag files, and
tag untag :TAG file1 file2, to untag files. Otherwise,
TAG is used (without the leading colon). For example:
tag new docs, to create a new tag named
tag remove png, to delete the tag named
The following command shortcuts are available:
||List tags or tagged files|
||Rename (mv) tag|
||Create new tag(s)|
||Merge two tags|
List available tags:
Tag all .PNG files in the current directory as both
ta *.png :images :png
NOTE: Tags are created if they do not exist
Tag all selected files as
ta sel :special
List all files tagged as
work and all files tagged as
tl work documents
Rename the tag
tm documents docs
Merge the tag
ty png images
NOTE: All files tagged as
png will be now tagged as
images, and the
png tag will be removed.
Remove the tag
images (untag all files tagged as
images and remove this tag):
Untag a few files from the
tu :work file1 image.png dir2
NOTE: TAB completion is available to complete tagged files. If using the FZF mode, multi-selection is available via the TAB key.
Tag expressions, that is, the
t:TAG construct, are used to operate on tagged files via any command, be it internal or external. A few examples:
Print the file properties of all files tagged as
Remove all files tagged as
Run stat(1) over all files tagged as
work and all files tagged as
stat t:work t:docs
NOTE: When using tag expressions (i.e. the
t:TAG construct), TAB completion is available to expand the expression into one or more of the files tagged as the current tag. If using the FZF mode, multi-selection is available via the TAB key.
NOTE: This feature, as always when multi-selection is involved, is only available when TAB completion mode is set to
FZF. See the TAB completion page.
You might not want to operate on all files tagged as some specific tag, say
work, but rather on some files tagged as
work. TAB completion is used to achieve this aim.
Let's suppose you have a tag named
work which contains ten tagged files, but you need to operate (say, print the file properties) only on two of them, say,
The list of files tagged as
work will be displayed via FZF. Now just mark the two files you need using TAB, press Enter or Right, and the full path of both files will be inserted into the command line. So,
p t:work will be replaced by
p /path/to/work1.odt /path/to/work2.odt.
Files searching is performed in CliFM using the slash character (
/). The general usage of the search function is as follows:
/PATTERN [-filetype] [-x] [DIR]
/ followed by a glob or regular (or extended regular) expression, and CliFM will list all matches in the current working directory. For example, both
will list all PDF files in the current working directory, the former using wildcards, and the second a regular expression.
Bear in mind that search patterns (if containing metacharacters) are evaluated first as glob expressions, and then, if no matches are found, as regular expressions.
Expressions containing no pattern metacharacter are automatically transformed into a regular expression:
/.*EXP.*. For example,
/.*test.*. By default, regular expressions (and thereby expressions containing no metacharacter) are case insensitive (glob expressions, by contrast, are always case sensitive). However, you can enable case sensitive search via the
CaseSensitiveSearch option in the configuration file.
To search for files in any directory other than the current one, specify the directory name as a further argument. This argument (DIR) could be an absolute path, a relative path, or an ELN. For example,
will search for all files starting with 'A' in the directory corresponding to the ELN 7, while
will list all
.conf files in the directory
The result of the search could be further filtered by specifying a filter type:
/[.-].*d$ -d Documents/
will list all directories containing a dot or a dash and ending with 'd' in the directory named
The quick search function also supports invert search: prepend the exclamation mark (
!) to negate a given search pattern. For example:
/!.*s$ -d /etc
will match all directories in
/etc NOT ending with 's', just as
/!D* will match all files in the current directory NOT starting with 'D'.
To perform a recursive search use the
-x parameter, and, optionally, a search path (
DIR). The search will be performed using find(1) as follows:
find DIR -name PATTERN. If no search path is provided, the search is executed starting in the current directory.
Otherwise, the search starts in
Search entries (stored in the general history file) can be accessed via the TAB key. Just type
/ an then press TAB to get the list of already used search patterns.
By default, CliFM only lists file names. To toggle to detail or long view mode press Alt-l. The output is quite similar to output of the
ls -l shell command, though it does not depends on ls(1) at all.
To get more detailed information about one or more files properties, use the
p command (short for
prop). For example:
to get information about those files whose ELN's are 5 and 10. The output format is based on the output of the stat(1) shell command, but, again, it is completely independent from it.
In the case of directories, you can use the
pp command to include the total directory size as well. Example:
bm (short for
bookmarks) is the command used to administer user bookmarks. The general syntax for this command is this:
bm, bookmarks [a, add PATH] [d, del]  [SHORTCUT, NAME]
With no argument,
bm opens the bookmarks menu (Alt-b is also available). Here you can cd into the desired bookmark by entering either its ELN, its shortcut or its name.
If we consider the first line of this image,
1 is the ELN,
h the shortcut, and
home the name of this bookmark.
In this screen you can also add, remove or edit your bookmarks by simply typing 'e' to edit the bookmarks file (F11 is available as well), which is simply a list of lines with this format:
To delete a bookmark, just remove the corresponding line from the bookmarks file (
If you want to add or remove a bookmark directly from the command line, use the
d arguments respectively. Example:
bm a /media/misc
You can also open a bookmark by typing
bm SHORTCUT or
bm NAME (in which latter case TAB completion and auto-suggestions are available).
A handy use for the bookmarks function, provided the
expand-bookmarks option is enabled, is to create bookmarks using short names, which will be later easily accessible via TAB completion and the suggestions system.
NOTE: If you are a Ranger or a Midnight Commander user, you can import bookmarks using the bm_import.sh plugin, bound by default to the
bmi action. Just run
bmi BOOKMARKS_FILE (usually
~/.local/share/ranger/bookmarks for Ranger and
~/.config/mc/hotlist for Midnight Commander).
If looking for information about some specific command, take a look at the complete list of commands.
Help for all internal commands can be accessed via the
You can also make use of help topics: just type
help and then hit TAB to get a list of topics.
Two important tips before starting:
1) Always try TAB: TAB completion is available for many things.
2) Pay attention to CliFM's
suggestions: whenever a possible completion/expansion is available,
Gemini, the auto-suggestions system, will print it next to the current cursor position: if that is what you want, just press Right or Ctrl-f to accept the suggestion: the text typed so far will be automatically replaced by the given suggestion. Otherwise, the suggestion will be ignored. You can disable suggestions via the
--no-suggestions command line option or setting
falsein the configuration file.
|Command||Full description||Brief description|
||Change directory||Change the current directory to
||Change directory||Change to the directory whose ELN1 is
||Open files||Open the file whose ELN is 12. TIP: Press TAB (or just pay attention to the auto-suggestion) to make sure
||Create files||Create a new file named
||Create files||Create a new directory named
||Create a directory named
||Back / Forth||Go back in the directory history list (the previously visited directory). NOTE: Enter
|Alt-l||Toggle detail/long view mode on/off|
||Files properties||Print the properties of the file whose ELN is
||Change permissions of the file whose ELN is
||Reprint the list of files in the current directory|
||Files search||Search for files ending with
||Files selection||Select all C files in the directory
||Files selection||Select multiple files in the current directory by ELN|
||Files selection||List currently selected files|
||Files selection||Deselect a few files. Use
||Copy files||Copy selected files into the current directory|
||Tagging files||Tag all PDF files in the current directory as
||Tagging files||Print the file properties of all files tagged as
||Copy files||Create a copy (named
||Move/rename files||Move the file whose ELN is
||Remove files||Remove all selected files, plus the directory named
||Trashing files||Send the files whose ELN's are
||Trashing files||Select trashed files and remove them permanently. You can also use TAB to get the complete list of trashed files, select a few, and then remove all of them from the trash can|
||Trashing files||Empty the trash can|
||Trashing files||Undelete trashed files (restore them to their original location). Hit TAB to get the list of trashed files|
||Bookmarks||Open the bookmarks screen. Here you can select the desired bookmark by just entering the corresponding ELN or shortcut.2 You can also specify the desired bookmark in the command line as follows:
||Bookmarks||Bookmark the directory named
||Workspaces||Switch to the second workspace. To go back to the first workspace, just enter
||Configuration file||View and/or edit the configuration file|
||Profiles||Change to the profile named
||Show hidden files. Press Alt-. to hide these files again|
||Sort files||Sort the current list of files by size in reverse order. You can use Alt-z and Alt-x to quickly switch sorting methods|
||Plugins||List available actions/plugins|
||Files preview||Navigate the file system via
||Quit||I'm tired, quit|
ELN amounts to
Entry List Number, that is, the number at the left of each listed file name. Consult the ELN and the interface sections for more details.
2 You can also enter
bm edit or press F11 to open the bookmarks file and manually add/remove/edit the desired bookmark.
3 Both files preview and icons depend on third-party software. See the corresponding links in the
Full description column.
Note: If you experience any problem with the default keybindings, consult the Keybindings issues section.