this post was submitted on 11 Oct 2023
132 points (90.7% liked)

Linux

48306 readers
701 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Who are these for? People who use the terminal but don't like running shell commands?

OK sorry for throwing shade. If you use one of these, honestly, what features do you use that make it worthwhile?

EDIT: Just to clarify, my point is I would almost always reach for fzf, fd, or rg before trying to manually search through a directory in a file manager.

EDIT2: A few people mentioned selecting files in a TUI. I don't find it any harder to select files using autocomplete. It might even be faster to start typing a name than it is it "scroll" through a list of files.

EDIT3: Here's a neat tool that can add some flexibility to your shell workflow: https://github.com/urbanogilson/lineselect

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 39 points 1 year ago

I never use them but I can see the point. Like when you’re poking around for a log file, not sure what it’s called or where it’s stored and just going on a hunch…but you’re in an SSH session and don’t want to deal with X shenanigans.

It’s a legit PITA to ls, look for files, cat/tail them, etc. sometimes you just want to ls -alR but your corporate build runs tmux on SSH sessions with no configuration so you can’t scroll back since your shortcuts don’t work so you have to pipe everything to more and it just sucks.

[–] [email protected] 35 points 1 year ago (3 children)

I use them for filemanagement on my server over ssh

[–] [email protected] 7 points 1 year ago (1 children)

Oh very good idea. I didn't even consider this

[–] [email protected] 8 points 1 year ago (1 children)

Genuinely curious what you did consider.

[–] [email protected] 6 points 1 year ago (2 children)

My daily driver. I hit the terminal a lot

load more comments (2 replies)
load more comments (2 replies)
[–] [email protected] 26 points 1 year ago* (last edited 1 year ago) (1 children)

I use dired in Emacs.

I assume you mean "why use these instead of file-manipulation commands in bash?"

I use both.

There are a handful of tasks that are easier in dired than bash.

  • Making small modifications to filenames that aren't amenable to programmatic changes. You can just toggle the read-only flag on a dired buffer, edit the filenames, and then hit C-c C-c when done.

  • Marking a set of files to perform an operation on where that set cannot trivially be expressed using tools in bash. Think, oh, "which movies do I like enough to want to keep around". This is especially handy when moving a number of files to another directory, which I think is why people often like the two-pane approach of orthodox file managers. Dired is not an OFM, but it can act like that if you have two dired windows open, using the other as the default target for the operation.

  • Dealing with filenames containing obnoxious-to-type characters like weird Unicode stuff. If I want to delete the one file in a directory whose name consists of a bunch of kanji, it's easier to just manually select it in a list.

  • Navigating where I usually want to see the contents of each directory. I'll often navigate around in dired while building up up an emms playlist. Browsing a list of movies to play.

EDIT: It's also not really a file manager, but I do use ncdu to see what's taking up space on a disk. I'll also use du -h|sort -h|less, but ncdu is, like file managers, more convenient when just browsing around the tree and looking at each as one does so, while manually selecting a few items to operate on (deleting).

EDIT2: I'll also add that virtually all of the people I know in person who love OFMs -- I'm in the US -- are from Eastern Europe, moved to the US from Russia, Ukraine, Romania, etc. I dunno why that is. Maybe just spreading along language lines. Maybe there are or were issues with switching between Cyrillic and Latin character stuff akin to my above irritation with kanji. But someone from Eastern Europe might have more input to answer your question.

EDIT3: The link I provided above for OFMs has a very long discussion from the author on why he likes OFMs (though not all terminal file managers are OFMs, many, like Midnight Commander, are). Reading it, I'd say that there's a lot of overlap with how Emacs works with dired+TRAMP+eshell and some other Emacs packages, though they accomplish similar goals in a different way -- sort of making integrated functionality that spans network file transfer, file management, text editing, file archive access, console commands, with a common toolset available for all. Would be quicker to learn an OFM than Emacs, though Emacs is gonna provide a considerably-larger set of functionality if you're willing to spend the time on it.

EDIT4: There are also a number of OFMs in Emacs, like Sunrise Commander, so I guess I shouldn't really treat it as an either-or matter.

[–] [email protected] 7 points 1 year ago* (last edited 1 year ago) (4 children)

Is it common than whenever somebody brings up "emacs" its a wall of text? Please don't take seriously.

[–] [email protected] 5 points 1 year ago

Yes, Emacs users are very thorough so expect lots of detail.

load more comments (3 replies)
[–] [email protected] 25 points 1 year ago* (last edited 1 year ago) (3 children)

With some people, it's just easier and faster to navigate a filesystem structure if you can just see it all laid out in front of you visually instead of "cd-ing" and "ls-ing" every directory you traverse just to see what's in it and having to "pwd" and remember where you are. Some of us didn't do too well at the memory game as kids.

load more comments (3 replies)
[–] [email protected] 24 points 1 year ago (4 children)

They're better than

cd something
ls
cd something-else
ls
cd ../..
ls
[–] [email protected] 4 points 1 year ago

But you don't need to cd before running ls. And in most cases you don't even need ls, autocompletion is enough.

load more comments (3 replies)
[–] [email protected] 18 points 1 year ago (1 children)

They are faster and more efficient for most basic file operations.

[–] [email protected] 14 points 1 year ago (1 children)

Id actually say, for super basic stuff the shell commands are faster. And super complicated stuff, shell commands are faster.

But it's that set of things in the middle of the bell curve that are more complicated that moving a single file and less complicated than running a bash script one liner that strings together 8 commands that these terminal browsers really shine.

[–] [email protected] 12 points 1 year ago (1 children)

My favourite one is renaming a directory full of files in nnn. It opens in vim, and I'm in my happy place, where I really know how to edit text (or, in this case, filenames). Great when there's some minor variation between a lot of files. Full previewing before saving, multiple operations handled before doing anything etc.

load more comments (1 replies)
[–] [email protected] 15 points 1 year ago* (last edited 1 year ago)

Most systems I interface with are remote or headless. Forwarding X is annoying as fuck and to be avoided at all cost, so the more I can do though the terminal, the better.

PS: I'm also old enough to have been a regular user of Norton Commander, the application MC (Midnight Commander) is based on (inspired by).

EDIT: Norton Commander was a DOS app and so useful that it prompted Midnight Commander, one of the earliest applications developed for Linux. So MC kind of pre-dates Linux in a way.

[–] [email protected] 15 points 1 year ago

Sometimes they are more convenient, than cd ls mv cp everything, when you don't have access to a file explorer.

Specially if you are working with a server via ssh, or some machine without any Desktop Environment installed.

[–] [email protected] 15 points 1 year ago

Sometimes it helps to have a visual aide for what you're doing. CLI/TUI apps are often faster, or when accessing remotely, lower bandwidth.

Also, let people enjoy thing.

[–] [email protected] 14 points 1 year ago (3 children)

It's really annoying navigating a filesystem in the shell.

Either you remember exactly where a file is located, have a reference, or you're going to be doing a lot of "ls, cd, ls, cd".

[–] [email protected] 6 points 1 year ago* (last edited 1 year ago)

That's not necessarily true. There are programs/plugins like scd in zshell which make your life easier. https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/scd/README.md

load more comments (2 replies)
[–] [email protected] 14 points 1 year ago

for example, when you need to copy some files and not the other, you can take your time selecting the specific files you need to copy instead of writing the list of files in one command. When you want to check the contents of a lot of files, you can just open file preview. Etc, basically sometimes CLI isn't as convenient as TUI/GUI

[–] [email protected] 13 points 1 year ago

Nostalgia for those 80s and 90s kids who grew up with norton commander ;-)

[–] [email protected] 11 points 1 year ago* (last edited 1 year ago)

Depends on what I'm going to do. I often use mc if I need to do something to a bunch of files but not all and the filenames are not good to filter on except by human eye. For example when I want to move a bunch of mixed downloaded stuff from my dl machine into grouped folders on my NAS. It's easy to go down through the list and select what to move from the download folder (where it's all in a disorganized pile) into the grouped destination folders.

If I work on individual files, or something that's easy to filter through wildcards I use terminal commands.

It's not for or against, it's about choosing the most convenient tool for the job.

[–] [email protected] 11 points 1 year ago

People who can use them effectively tend to be a way faster with the regular admin work. Also, they can do some things which are not that simple on the command line (browse through tarball, browse through remote directories).

[–] [email protected] 11 points 1 year ago* (last edited 1 year ago) (2 children)

Eh... for home servers, when you want to take a quick glance at the files (maybe you are running a script that copies files around after some time...?). Then again, I don't really find em useful when I have ls -al shoved inside my brain. It's (kind of) "second nature" at this point.

load more comments (2 replies)
[–] [email protected] 10 points 1 year ago (3 children)

One of the first things I install is mc (sometimes ranger). It's just a really fast way to get around.

CLI is fast, but GUI is (if done right) intuitive. Running mc is both. Very fast way to explore/get around file system.

load more comments (3 replies)
[–] [email protected] 9 points 1 year ago (4 children)

Well, for schoolwork, I mount my Google Drive storage onto my ~/googledrive directory (where I store all of my schoolwork) and usually use mc to navigate. Although, I am quite comfortable with the terminal. Its just that I have a lot of subfolders and going to a specific subfolder in mc is usually faster than doing "cd ~/googledrive/subfolder-with-long-path".

[–] [email protected] 7 points 1 year ago (4 children)

Have you looked into Autojump? It works with bash and zsh and is even faster than using a terminal file manager if you've already visited the directory before

load more comments (4 replies)
load more comments (3 replies)
[–] [email protected] 8 points 1 year ago

I use it more or less to browse my multimedia files. Ranger knows if it's a pdf or a mkv file, so I don't have to do anything but hit enter. When watching a series, I hit Q in mpv, down arrow and enter to play the next episode instead of writing mpv tab tab enter. It's also got pretty nice tools for mass renaming, deletion, and probably a lot more that I didn't bother learning. But if I want to get a specific file, say a config file, then I just open it normally with an editor from the terminal instead of going from /home to / to /etc

[–] [email protected] 8 points 1 year ago* (last edited 1 year ago) (1 children)

As a Linux newb, it's easier than opening a SFTP session next to the terminal as I'm learning the file structure so it's either that or cd then ls for every damn folder because I don't know where I am or what's in this folder vs that. Ranger has been nice for me as I learn.

load more comments (1 replies)
[–] [email protected] 8 points 1 year ago

I use a mix of shell commands, terminal file manager, and GUI file manager depending on the task at hand.

The terminal file managers are quicker to navigate to a particular file/directory since it doesn't require typing commands but I can still navigate with a few key strokes as opposed to using a GUI.

[–] [email protected] 7 points 1 year ago

I use ranger and it's multi-purpose. I use it as a file manager, file editor (via vim) and also a disk mounter (through an add-on). I can run shell commands if I wanted to.

What I really like is that I can use the :mkdir command to make one directory with spaces in its name or :shell mkdir to make multiple directories in one go and escaping spaces if necessary.

I like that it shows you how much space is free based on which partition you're on. Another useful feature is being able to preview images.

Now, not all of what I mentioned is unique to ranger but it's fast and navigating is easy. If I'm copying files between two folders, I can put a flag down and use ' to jump between them.

Ranger is very customisable so if you want to control how different file extensions are handled then there is a config file that'll allow you to do that.

[–] [email protected] 7 points 1 year ago

In the good old DOS days I used Norton Commander, when I need to look through the directory structure on a server it's easier with Midnight Commander.

[–] [email protected] 7 points 1 year ago (1 children)

Keybindings compared to shell commands are just better imo compared to shell commands. And keybinds to insert filename/path to commandline (like Esc+Enter in mc or %s in ranger) are more useful to me than autocomplete. Also, multiple panels for running shell commands with arguments from different directories.

[–] [email protected] 4 points 1 year ago

Did you know that "esc, enter" is actually a workaround for "alt+enter"?

[–] [email protected] 7 points 1 year ago

For me, it's about using the right tool for the job. Sometimes, using full GUI file manager is overkill, especially for copying just one file, and you know exactly where you want to copy it from and to.

And a TUI file manager like mc, ranger, nnn are a good in between level of ui, and is great for browsing files distraction free from the visual clutter of a full GUI file manager. That may seem like not a big deal, but I think it's nice to be able to see things simply and straight to the point. For me, it just feels nice and less frustrating.

What I like about Linux is choice. And in this case, choice in file management. Pick the right tool, and you'll get things done more efficiently, and with less annoyance.

[–] [email protected] 6 points 1 year ago (2 children)

I use vifm because of bulk rename, it literally opens a vim buffer with each file name as a separate line. Just think about the possibilities… (I know this is possible somewhere else, but I haven’t found anything similar)

load more comments (2 replies)
[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

I use mc for sorting stuff on my NAS. These 15 files go here, these 20 pictures into that directory. Let me have a quick look at that text file, okay I can delete it. Look if I got biggest files, this downloaded file gets renamed, ...

I don't know of any better way to do it, except write super long 'mv' commands and have 3 ssh connections open.

[–] [email protected] 5 points 1 year ago

I have wondered this as well. I do find that sometimes I DO prefer to be able to see image thumbnails, but that's about all I see.

There's some good stuff out there, but zsh for me is plenty feature rich to do the job.

[–] nous 5 points 1 year ago

I am not sure there is any killer feature that you cannot do in a cli application. It is just a different way of working. Slightly better at some things slightly worst at others. But the biggest difference is what you are used to more then and single feature set.

Though I don't personally use them, I also use a shell with a lot more interactive features built in then default bash does. If I where stuck with only default bash maybe I would lean more towards them. But that is just the way I work, others work differently then ai do.

[–] [email protected] 5 points 1 year ago (3 children)

Anecdata: I had been "running shell commands" happily enough for 15 years. And then I tried Ranger. It was immediately clear that everything is faster, sometimes much faster. This supposes that you are familiar with basic Vi key bindings. It's not about "features", it's much simpler than that, it's about keystrokes.

load more comments (3 replies)
[–] [email protected] 4 points 1 year ago

I used mc many yeas ago until I learned CLI utils well enough to use them efficiently. I think, it is the main point: you get a tool that does not require a lot of time to start using it. But in most usage scenarios TUI FMs are less effective than CLI.

[–] [email protected] 4 points 1 year ago
[–] [email protected] 4 points 1 year ago

I use Dired mode in Emacs which I guess also counts as one of those. I find it very convenient because it's integrated into Emacs. Also, I wouldn't like to use the mouse for file management.

[–] [email protected] 4 points 1 year ago

This paper describes the paradigm in detail, they're called Orthodox File Managers.

I learned Norton Commander way back in the 90s, then moved to Midnight Commander, and it's still a key part of my toolset. Using the keyboard in a hybrid shell / tree view mode is still the single most efficient way I've found to manage files. Need to find files under a subdirectory? Press F7. Need to move an entire directory somewhere else? cd to it, then press F6. Want to move all the pdf files under a subdirectory somewhere? Use the find dialog, then move the search results. No mouse/trackpad needed, everything is at your fingertips.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago)

Way back when DOSLinux existed the dev provided a Midnight Commander with a fully loaded F2 menu as well as setup associations. Could literally do almost anything and everything from within the file manager. I later moved the configs over to Slackware and pretty much lived in MC to get things done. At some point the MC code reduced the number of entries in the F2 menu so I would have to rebuild it to remove the limitation.

No longer use it like that today but MC is used constantly for file management locally and remotely (mostly to a Kodi box).

Using OFMs (Norton/Volkov/Midnight Commanders and FAR) has always been easier and faster to use than Explorer-style GUI FMs for me.

[–] [email protected] 4 points 1 year ago

Regular file managers provide an extremely bad, inefficient user experience. I grew up using Total Commander, so it's more convenient to me to use something like it.

[–] [email protected] 4 points 1 year ago (2 children)

I only use lf in foot to have a preview of a file (image, text, pdf, ssl cert, everything with sixels, cat or the specific command) without opening or searching for that file first. It's faster to just use lf to search for a file instead of opening every single one. Other than that I find using xdg-open, cp, mv, rm etc. is faster compared to using any file manager, probably because I never learnt lf's shortcuts properly. All GUI file managers I know are bound to their DE, eg. dolphin and nautilus, which sucks with a WM.

[–] [email protected] 4 points 1 year ago

Thunar and Pcmanfm are not tied to any DE.

load more comments (1 replies)
load more comments
view more: next ›