5 ms·
Seems like running `ls` takes twice as long as running `nnn`, but I wonder how long it takes to type each... $ ipython In [1]: %time input() ls
by SonOfLilit 7y ago
Seems like running `ls` takes twice as long as running `nnn`, but I wonder how long it takes to type each...
$ ipython
In [1]: %time input()
ls
Wall time: 324 ms
Out[1]: 'ls'
In [2]: %time input()
nnn
Wall time: 711 ms
Out[2]: 'nnn'
In other words, `nnn` takes twice as long (on my setup, including a qwerty keyboard and my fingers and muscle memory) and it's on the same order of magnitude as running them, so I guess they're more or less equal.
This is all tongue in cheek, but my point is that the important optimization is of user productivity and not of runtime, and in that respect as far as I'm aware `Total Commander` on Windows and its open source plugin-compatible clone `doublecmd` that runs on both Windows and Linux are far superior to anything else in the market. Don't let the Windows-3.11 reminiscent design scare you, with Total Commander you'll be as productive doing complex file operations as those vim masters are doing complex text transformations, and you won't ever be able to go back to any other file manager.
edit: I misread, actually typing them is a decimal order of magnitude slower than running them on 2083 files.
- apjana 7y ago`nnn` is covered there. It's not a one-shot utility, but a file manager. Also, you would be happy to know I use the following alias on my system to fire it in 162 ms: alias n='nnn -isl'
- SonOfLilit 7y agoNaturally :-) That's why "tongue in cheek". I still can't imagine myself switching from Total Commander, it's so amazingly powerful.
- jandrese 7y agoI alias 'ls' to 'd' when I'm setting up an environment.
- eindiran 7y agoDo you mean that you have an alias like this: alias d='ls' Or is there a program called `d` that is a faster version of `ls` that you're aliasing `ls` to?
- jandrese 7y agoJust an alias. I figure I could use a single letter command for something I do like 1/3 of the time on the commandline, especially since it's on the opposite hand from the enter key. ls is actually pretty well optimized for an QWERTY layout already so it's not a big win, but it's something I've been doing for 25 years now so the habit is well ingrained. Usually the alias is now: alias d="ls -F --color=auto" on Linux systems.
- mandriva2001 7y agoIt was the default since Mandriva/Linux Mandrake 6.2 too!
- v_lisivka 7y agoWhy not just use a console file manager, like mc?
- apjana 7y ago`nnn` is a console file manager.
- SonOfLilit 7y ago`d` is taken by the much more important command `git diff`. I don't even have an alias for `ls`, I seldom use it, I mostly run `s` (which is an alias of `git status` of course).
- pvg 7y agoWindows-3.11 reminiscent design Strictly speaking, it's an MS DOS design - a descendant of Norton Commander.
- JdeBP 7y agoThe formal name is an orthodox file manager.
- pvg 7y agoAn inexplicable and incomprehensible choice, given that they've all been 'commander' for 30+ years. Norton Commander, Midnight Commander, Windows Commander, Total Commander, Derek Smart's Desktop Commander, etc. Clearly they should just call it a file commander. Fits much better in an overweening nerd-judgmental sort of recommendation too - "You're using a file manager? You should really switch to a file commander "
- SonOfLilit 7y agoI meant the graphic design, which is what put most people off.