Yeah, because that's way faster and more convenient than double clicking on an icon.
This one is great too: Don't open the file explorer! Instead you should type "find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
Seriously?
It is if you happen to have both hands on the keyboard.
That said, I usually navigate a GUI file explorer using the keyboard too, so pressing Enter to open a file is even faster.
(This comment was submitted entirely using the keyboard.)
When copying files from one directory to the other - CLI vs GUI is debatable in terms of speed (I'd still say GUI is faster, but let's assume its debatable). But what if I want 1, 2, 5, 7 and 10th file; not all files? It is remarkably faster in GUI: Ctrl + click files I need and drag+drop. Done. Good luck fumbling around with CLI.
CLI nerds are the most annoying people I've encountered. They're myopically obsessed with their tmux + cli workspace and are not open minded.
I would've been able to type open and tab-complete the filename in the time it takes to move my hand over to the mouse, move the mouse to the right file, and double-click. The mouse is close, but not as close as the keys under my fingertips.
How did you do that? Using a specific browser extension?
I am looking for ways to use my browser with keyboard only.
If you're willing to ditch the mainstream browsers, there's Nyxt. For browsing static wikis from a tty, there's ELinks.
So z [4 chars] enter o [2 chars] tab to complete enter is actually pretty quick.
No matter how fast you can type, typing this clusterf*ck of a command isn't faster than using a better utility (command line or GUI). And I assume complete beginners (which the page seems to be for) don't know how to set up shell aliases just yet.
Say I want to edit .psqlrc
Doing it in GUI is like 10x slower. First dot files are usually hidden by GUI, so I have to search through menus on how to enable their display. Then I have to look for the damn file. Where it is among 200 similar dotfiles? 5s later I find it. Now right click, pick an corect editor from a submenu of a context menu. Edit. Save. Now go back to file browser and disable dotfiles display, otherwise all my regular files get drowned in noise, slowing the normal usage. It's retarded.
Alternative. Open terminal. Type vim .psqlrc. Edit save. Close terminal. 3s top for the non-editing parts of the workflow.
They do say you can just write `tree` on Linux. If you don't have that command, you can just alias `tree` to the find command.
The other issue is that few file managers are as powerful as command line utilities. There are exceptions. I am quite fond of Directory Opus while using Windows since it feels like a program designed by people who understand the scope of file management. Alas, it is an exception rather than the rule. Most file managers facilitate basic functions then stop there. With the shell, that's not really an issue since you can always add another utility to your tool box.
Linux (whatever env provides this): xdg-open $dir
qmv -f do *.pdf
find -name "*.epub" -exec mv {} ~/books/ \;
cp *.c ~/remote/hostname/src # with sshfs
The list can go on. The GUI may be better when you have to manually pick through a small number of files, but calling up a file manager to handle a single file or a bulk operation rarely makes sense (if you're already in a shell).
EDIT: inserted line breaks
You might be in a terminal, in the directory you're you want to copy a file within... $open ., type file name, command-C, command-C, command-W would do a great job, require minimal additional effort, but provide better visibility into the status of the copy, allow you to better handle file name collisions, allow you to retry, and be undoable.
If you didn't know the correct program or arguments for zip, you could simply look around the menus and find 'compress'.
Even scripting, you can use the best tool for the job. AppleScript or similar can be used to script GUIs and also for testing.
I don’t know if it’s more efficient, objectively, but this just is the workflow that matches how I think.
I'm guessing that the reason it's not there is that for most casual/GUI users, Documents/Downloads/Desktop (which are all in the sidebar) takes the role of /home in traditional Unix.
(Ok, with the exception of wanting to look at a bunch of images in thumbnail mode. Then I launch a GUI file manager.)
The shell is where I "am" and launching a GUI seems more cumbersome than typing the command.
In fact reading this post made me realize that using the terminal for file operations is not as common as I thought.
Even when I use Finder, I use it like a CLI: typing and shortcuts for everything and minimal clicking.
The only exception is that I occasionally drop files, urls and documents from GUI applications into iTerm, rather than type out the whole thing.
That said I now work in the Windows world. I find that if you are using the same tools day in day out then the keyboard is the way to go. If you have to use new tools every other week the GUI is hands down much better. Unfortunately in my role I'm doing exactly that.
I haven't had a GUI file manager installed on any of my desktop computers since the early 2000s, and the last time I used one regularly was the mid 1990s.
Hacker News in 2021: Where the "hackers" think that "doing it in command line is pointless."
Name one thing that a GUI program can't handle, I dare you. Me, on the other hand, I can point you to a trillion dollar business that uses only GUI and not a single CLI, to say the least.
So just because companies have proven that GUI is successful and capable, it's still possible that it "can't handle" a lot of things nearly as effectively as CLI in some cases.
Here is a simple task which can easily occur in business: you have a folder with thousands of files named somewhat haphazardly. Copy all the files with have numbers 2011 to 2019 anywhere in the filename to an usb stick.
I would search for "2011 2012 2013 2014 2015 2016 2017 2018 2019", select everything that shows up in the search results, and copy those to the USB. Wonder what I'd do with millions of files though.
> Me, on the other hand, I can point you to a trillion dollar business that uses only GUI and not a single CLI, to say the least.
No you can't. There are 5 companies with a market cap over a trillion. We can easily rule out Apple, Microsoft, Amazon and Google as they have all developed CLIs.
That leaves Saudi Aramco. Doesn't take long to see they have openings for CLI heavy jobs.[1][2]
Aside from that being an entire industry as opposed to a single company, are you not aware that BigCo games generally contain a developer console of some sort? Even the ones that don't provide end user access to it still usually have one buried somewhere.
Plus many of the dev tools for manipulating assets are either CLI based or have one integrated ...
- Optipng
- ffmpeg
- sox
And so on.
[1] https://docs.xfce.org/xfce/thunar/bulk-renamer/start
Pipe input/output between programs. Chaining cli tools is essential for my work and personal usage.
> Me, on the other hand, I can point you to a trillion dollar business that uses only GUI and not a single CLI, to say the least.
That's observably not true. Why didn't you just type out the name?
And even though the game industry primarily makes GUIs, it still uses CLIs everywhere in the development process, so it's pretty silly to say that it "uses only GUI and not a single CLI." And the console that's present in just about every game doesn't seem very "graphical" either.
A CLI represents that structure by accepting textual commands and presenting output textually.
A GUI represents that structure by displaying objects graphically, showing their spatial representation and connection.
And, traditionally, a GUI tends to show more structure up front while a CLI simply prompts you for a command.
The distinction isn't perfect, but a text adventure game is well inside the CLI camp.
2. Every single company in that industry uses cli tools.
Both assertion from your original statement are incorrect. What’s your beef with the command line anyways? It’s just an interface.
Get-ChildItem | Out-GridView -output multiple | Format-Table
There is a GUI with piped input, and piped output, which can be used to filter the pipeline objects using ctrl-click to multiple select "I want this, this, and that" in a view that is sortable and filterable. firefox (find . -type f | shuf -n10)
I doubt your computer comes with a GUI program that can do that for you. My point is that CLIs can easily be plugged into each other whichever way you want, but GUIs (except in some niches like audio) aren't built that way for some reason. find ~ -iname Makefile -exec sed -i ´s,-g,,g´ {} +