8 ms·
I use the command line extensively but never found a need for a file manager in there. Just `cp`, `mv`, `rm`. Am I missing something big by not having one?
by KKPMW 6y ago
I use the command line extensively but never found a need for a file manager in there. Just `cp`, `mv`, `rm`. Am I missing something big by not having one?
- benterris 6y agoI use ranger quite a lot when I have to explore the contents of a folder I just cloned or downloaded. Moving around with vim keybindings is much quicker than typing many `cd`, `ls` and `cat`, as you have a preview of files or folder contents on the right side. I find it also quite useful when doing some housekeeping and cleaning, as while moving around you can mark several items to delete or move them all at once.
- OskarS 6y agoRanger is fantastic, if you're used to vim keys you should definitely check it out. It do all those things you mentioned, but honestly my favorite use of it is as a replacement for `cd`. If you run it with `. ranger` (which I have alias'ed to `rd` in in my terminal), you end up cd'd to whatever directory you left off ranger at. Combined with the "f" command in ranger (as well as bookmarking folders with "m"), you can zip around your filesystem incredibly quickly.
- unixhero 6y agoYou never tried and gotten used to orthodox file managers perhaps, such as the mighty Midnight Commander. That's okay. Yes you're missing out on a world of productivity.
- KKPMW 6y ago> That's okay. Yes you're missing out on a world of productivity. Feels like a sentence like this doesn't explain much. I assume you are not moving files around all day, so where is the productivity exactly in a tool like Midnight Commander? What it allows you to do?
- BeetleB 6y agoOne answer you probably won't be happy with: You don't need to memorize lots and lots of command line options. I can never remember the ones for tar, for example. Bookmarking directories (local and remote), although there are command line ways to do this. Being able to quickly view the contents of multiple files (that don't have a simple pattern in the filename). Frankly, any operation you want to do on multiple files that don't have a convenient regex to specify on one command. Say you have a directory of 100 files, and you want to copy about 15 of them elsewhere. It's just a lot easier in midnight commander to select them than to type out all their names. And then there's stuff like selecting all files that have certain permissions, etc. No doubt you can do this from the command line, but again: Convenient when you don't know how. Bulk renaming of files - again: I don't remember how to do this on the command line, and it's dangerous if I screwup. Easily navigate any compressed files and copy stuff into/out of it.
- jnxx 6y ago> You don't need to memorize lots and lots of command line options. But instead, the keyboard shortcuts for the file manager. > Bookmarking directories (local and remote), although there are command line ways to do this. For example zoxide. And depending on the usage pattern, it might turn out more flexible and easier to interconnect with other things. > Say you have a directory of 100 files, and you want to copy about 15 of them elsewhere. What is your typical use case for doing this? I can quickly think of two situations where I needed to do that: One I was copying a selection of photos for my uncle to a folder which I was going to burn on a CD. I am right now not sure whether his laptop still has a CD drive. The other was I was developing some windows library and I needed to make a zip package for other people to test it, because there was still no installer. I think I am not that unusual that generally I try to avoid making copies of the same data to different places; I try to use version control instead.
- BeetleB 6y agoI was going to respond individually, but I realized we're looking at this the wrong way. If you compare bash of today with that of 20 years ago, a lot of extensions/features have been added. On top of that, people use 3rd party tools to enhance their command line experience - you yourself mentioned zoxide. Lots of people make use of fzf. Imagine someone asking what the benefit of fzf is over using the command line - you likely will say that there's a false dichotomy - fzf is a command line tool to enhance your experience. Likewise, midnight commander really is just that. You don't have to choose between the two. When running mc, you have full access to the command line. If you wish, you can just make the panels disappear and invoke them with a keybinding whenever you want to use them. I assume ranger will have similar capability. It's not mc or the command line. It's mc and the command line.
- jnxx 6y agoI'd say it depends on your usage patterns. When I was a beginner, I liked Norton Commander a lot. Together with Midnight Commander (mc) on Linux, it belongs to the family of "orthodox" file managers which ranger is derived from. All these come with a visual display of the files in the current directory and are fast to navigate. The command line tools are very fast to type and more powerful than Midnight Commander, if you took the time to learn them. I do really not think it is a issue that one needs to look up flags which one uses very rarely. But, they might need more time for discovery of files. But the latter is only a issue if you do not work mostly on files you know well. For many software developers, this does not happen that often. Also, the CLI tools will be present right away on all systems you work on, which us very useful if you often log in to servers or embedded systems. Also, if you need to explore unknown directory trees, there are alternatives. For example, in certain cases, I am using Emacs dired a lot, especially when editing Makefiles, because then I have the exact file names already in my kill ring. Now, ranger is more powerful than Midnight Commander, for example it can do a correct "copy/paste" operation with pasting symlinks, or hard links. And it can do that with a set of files which were hand-picked from different directories. That is nice, but again it is something which one might not use very often. It is a bit similar like tmux having some, let's say, 150 key bindings but you only remember the ten or twelve you actually use often. And this is where I run into a problem, or more neutrally said, into a region of diminishing returns: I could put energy and time into not only learning tools like ranger, but also use and deliberately practise them. But this needs time and effort. And this kind of time is a scarce resource, after all, I could learn more of emacs, say, magit (which is a truly fantastic git front end), or stumpwm key bindings (a window manager which works much like emacs), or learn whether "lz" is really better than "bzip2", or of one hundred other things. And my reasoning so far is that if I forgot such efforts after using them some time, they are actually not that useful for me. Because the human mind has the convenient feature of only remembering things which are either important, or used very often. And in the specific case of ranger, this might be totally different if for the next week I have the task of tidying up and cleaning out a folder tree with 1000 folders and 10,000 files, for my successor on a project. Or, to sum it all up with some XKCD reference: Is it worth the time? https://xkcd.com/1205/ https://xkcd.com/1205/