Ask Slashdot: Command Line Interfaces -- What Is Out There?
Mars729 writes "GUIs are walled gardens in that features available in one piece of software is not available to other pieces of software. However, there is software out there with command-line options that can make software features accessible to power users and programmers. Some important ones I have uncovered are:
- Exiftool: A command-line application that can read/write almost any kind of metadata contained in almost any filetype
- Imagemagick: This and similar software like GraphicsMagick is a full-feature toolkit for displaying, converting and editing image files.
- Irfanview: Like Imagemagick but faster, although it has much fewer features.
FFMpeg: For video files - VLC: For audio and video files
- Aspell: A command line spell checker
- Google Static Maps API: A URL with coordinates, markers, zoom levels and other options to show a custom map from Google Maps. (I just uncovered this: no need to learn KML!)
Less useful but still useful are command shells. These provide file management mostly. I believe some of them may allow for sending and retrieving email messages. Also useful but less accessible and with a steeper learning curve are software with APIs and scripting. Examples would be Visual Basic for Applications in office software and groovy scripting for Freeplane. What else is out there?"
You all will love to use
systemctl
journalctl
The first shows all services running on Linux
The last shows all binary logging on Linux
Get used to those commands because its the defacto standard now.
I'd like to bash the submitter. Command shells less useful my ass. Pretty much the entire *nix world is built around shells and files, with variations on a theme thrown in (pipes, sockets, etc.). Welcome to what the rest of us have known for decades.
Your way of thinking needs an upgrade. Soon everyone needs to understand the concepts of systemd. That means your overall usage of grep, sed, awk, etc. will decrease. Wayland will bring another change in your life. Hope you welcome these. Oh I forgot, you won't be asked :)
PowerShell deserves a mention too. Some people hate it, some people love it.
It is object oriented so the data transfer between processes is more robust. Also all the commands' manual pages come with extensive documentation and lots of great examples. UNIX man pages usually lack examples.
mulk - much needed modernization of wget's functionality :color ir_black
qrencode - copy-paste from the desktop to a mobile device, or maintain an airgap
iotop - like htop for IO
history - built into bash, re-issue old commands as !number
pkill - kill programs indiscriminately
youtube-dl - keeps working even though google has almost killed youtube
netstat -lnp - see which program is bound to which port
vim - it won't make sense until you install plugins like spf-13, learn a few key combinations and set
tar -zxvf - you can remember it because the keys are right next to each other
pxz - parallel LZMA compressor
alasamixer - volume control
locate - find files, update the index with updatedb
Looking forwards to see more!
All rites reversed 2010
What I'm trying to understand, is how the submitter intends to use the CLI for a program without a shell of some kind. Unless he's talking about programs like Midnight Commander or Norton Commander (for people who really are getting old) by the term "command shells".
All that said, an interesting program is motion -- it lets you use a USB webcam as a motion detector, is scriptable, takes snapshots or movies.
http://www.lavrsen.dk/foswiki/bin/view/Motion/DownloadFiles
What changed under Obama? Nothing Good
OP is just discovering the command line and finding out, that you can actually do almost anything with it.Don't bash his learning process (pun intended).
Take a webcam picture:
streamer -f jpeg -o image.jpg
Do magic with that picture:
convert image.jpg -colorspace Gray image_gray.jpg
And do check out rest of the ImageMagick:
http://www.imagemagick.org/
And if you happen to be using OS X, also check out sips(1). It does much of what ImageMagick + DCRaw does, but a lot faster.
Check out my sci-fi/humor trilogy at PatriotsBooks.
The best mix I ever saw was with Apple's MPW Commando interface. They had a unix like script language, but when you couldn't recall the special arcane syntax of some command, you could just hilite the command name and hit a key. A Commando dialog box came up formatted with radio buttons, checkboxes, etc. which recorded every dodad the command could use. Clicking and typing into the dialog fields built the text command for you in a pane at the bottom of the dialog box. When you were done, you could hit the run button or copy and paste the command into a command line window or paste it into a script you were building.
So far this submission has seen a really disappointing response from the Slashdot crowd. They look like braggarts who do not actually know anything about the subject matter.
That's because the question itself shows a fundamental lack of understanding that renders any answer that might be provided as simply incomplete at best, and actively misleading at worst. The submitter does not understand the subject matter well enough to understand why the question was flawed, and knowing where to begin explaining to the submitter what he/she needs to know is a very tricky problem.
We can infer from the way the question is asked that the submitter probably has spent most of their life as a windows user, and has probably recently discovered power shell. It is also possible, although unlikely that they have recently started playing with Linux, but if they did, it would have to be Ubuntu, or another newbie friendly distro, and they probably installed it, and not much more. My guess is that this person is in their late teens or early twenties, and if they are attending college, it is not in a CS or related degree. The probability that this person is Male is about 87% give or take.
All that having been said, my advice is actually rather simple. If he/she has not already installed Ubuntu, do so now. regardless of their current enrollment status, get signed up to take a beginner level programming class. Make absolute sure that this class uses a UNIX based curriculum, and not Windows, as the UNIX curriculum will almost definitely be Command Line only. The reason I make this suggestion is because beginner level programming will teach the fundamentals of command line interpreting, and will give a solid basis for understanding how programs start up, and what they have to do, and how they do it. If (as I suspect) this person is still a high school student, this will give them college credit as well, and will look good on a college application, especially for a CS related program. The one warning I will give, is that this class will be relatively boring. There is nothing sexy or exciting about beginner level programming. You will need years of experience before you will be ready to tackle the fun stuff, and 90% of programming is "boring" details anyway, but this will help align your understanding of how programs work to what they are really doing under the hood, and should give you a basis for asking more salient questions, and getting better answers, in the future.
I wish I had a good sig, but all the good ones are copyrighted
Less useful but still useful are command shells. These provide file management mostly.
Ohhh, baby. If you think ImageMagick is cool by itself (and it is), just wait 'til you start to grok how powerful those "less useful" command shells are for gluing those complex tools together. It will blow your hair back.
Say you have a directory tree with a few hundred images scattered through it, and you want to create thumbnails for all of the images in a parallel directory structure; ImageMagick will do the thumbnail part, CLI-Fu will handle the directory traversal and turn a three hour job in to a three minute one.
Learn these for starters:
sed - text parser and transformer, for mutating file names and munging commands
awk - ultra-terse programming language, great for building more complex commands than you would with sed
find - traverse a directory tree and list files with conditional matching
xargs - process a large list of things (like files found with find) in batches
grep - filter out elements of a list based on string pattern matching
egrep - enhanced grep, includes more advanced patterns and wildcards
sort - sort lists numerically or alphabetically
wc - count the elements of a list, words in a line, or other things
wget - download a URL
curl - read a URL to stdout
Seriously, when you start piping those things together with the more complex command line tools like ImageMagick and FFMpeg, you will be astonished at the mass data processing you can do with a few dozen characters on the command line.
Stop-Prism.org: Opt Out of Surveillance
New users never heard about bash. We live in the 21th century. By now no one should use things like grep, sed or awk anymore. The developers around systemd make sure that this functionality is soon hidden away from the audience.
Right, and that's the problem, new users don't understand how to use command line tools so everything gets loaded into a GUI like Excel or Access. We had a user insist that he had to have MS Access so he could process a big log file to extract a few records from it -- it was too big for Excel. He was a couple hours into figuring out how to get the file loaded into an Access table when someone asked me if I could help. 10 minutes after installing ActiveState Perl, I wrote a script to extract the records they needed, it ran for a couple hours to churn through over 100 gigabytes of data (limited by the speed of the fileserver), then after we had the data, I used a couple regular expressions to pull the data fields they needed out of a free form text field, and then 20 minutes later, used the data in the file to output the SQL commands that they needed to fix up the database (which is why they where looking through the file in the first place). They had originally planned on spending at least 3 days on this project. The Windows "find" command line took may have helped preprocess the file, but its lack of regular expression support would have meant running it dozens of times to get all of the data they needed.
Command line tools are still useful, even in the 21th century. If I didn't have Perl, then grep and/or awk would have been able to extract the data with a single pass through the file.