New Poll: Command Line Usage

I have a feeling the readers of CSS-Tricks represent a fairly wide range of job types and skill levels. It would be interesting to know how frequently used command line usage is amongst the general web worker population.

Call it what you will:

"Shell"
"Terminal"
"Command Line"

Or specifics like Bash/Dash/Zsh/Etc. In this poll we'll just call it the command line for consistency. It's the thing where you type in text commands and a computer does something.

OS X comes with a program called Terminal. But all operating systems have some kind of command line access.

I think probably the easiest metric to gather would be how much people use it. So let's make the question:

On average, how many commands do you run from the command line each work day?

Vote in the widget on the site itself. I broke the choices down into answers ranging from "not at all" to "pretty much your entire job" - but specifying actual numbers. Feel free to guess, but apparently there is a way to get an accurate count:

I’ve been programming since the days when there was no choice but to use the command line. I don’t think that even when I was spending hours and hours at a real ASCII terminal would I be typing thousands of commands a day; that’s just wild, or perhaps an indication that somebody might not “get” the whole shell script thing. Even 30 years ago, lots of time was spent inside a text editor.

If you’re typing a CLI command once every 10 seconds, it’s almost 3 hours before you get to 1000. What are all those commands doing?

For those people who do think they run 1000s of CLI commands a day — what are they?

I assume my number would be over 1000 most days; my HISTFILESIZE is set to 1000, and almost all the commands currently in there are from today.

A lot of that isn’t actually run from the command line, though – I’d say about a third of that is commands run while in Vim – a lot of which are run as a result of keyboard mappings or autocmd’s. The rest is split between navigating around, grepping and searching for files, git/ssh/ftp/managing projects, and then only a small amount of actual functional munging of data from the shell prompt.

I’m with you Mike, I really don’t get where all the command lines are used. I also have worked for some pretty large scale corporations that agree with me that git, sass and the like (while useful) definitely slow productivity. I almost think it’s a “status” thing more than a necessity.

Agree…I believe the Command Line has become a bit of a geek cred thing…We invented GUI’s 50 years ago because they were easier and more productive for the majority of users and for a lot of use cases…but entering text commands into the command prompt is so much cooler now…

The terminal / command prompt has it’s place but it is not the end all be all…

I definitely have to disagree with you on this one. I think perhaps what you’re referring to is a dip in productivity during the learning phase. Personally, I have experienced a huge boost in productivity by learning things like Sass and Git. I think the “status” aspect comes from the satisfaction that you’ve harnessed the power of these tools and are experiencing a bump in productivity. It certainly makes me proud to have gone through the pain of learning those tools.

I’m not sure GUIs actually increase productivity in all cases. They were invented to help everyday people harness the power of computers and make them more usable, but I find now that they can often get in the way – I’m much faster if I my hands never have to leave my keyboard to reach for the mouse. The problem lies in the fact that it takes a ton of training and practice to make this happen.

I have to disagree also. Whenever I pair program with a coworker who doesn’t use the command line/know keyboard shortcuts it’s like they’re moving in slow motion. Everything requires stopping, finding the mouse, navigating to the right menu or dialog, etc. vs just typing a couple words… Of course, not every task lends itself to the command line and if you’re a slow typer then that could be an issue.

Sass is another thing entirely. However you compile it (from the command line or GUI) it’s just a huge win all around in terms of productivity/maintainabilty…

The command line is not just “git and sass” (which, incidentally, you can run via a gui). And we have all worked for pretty large scale corporations, and we know productivity is not what they do best. Plus, they are made of people, many of them, surely you’ll find proponents of all camps in a corporation?

With that out of the way – the command line lets you do stuff much more quickly, and lets you string command together, and it lets you store long commands in aliases or script files.

For example, one of the last command I have used today was
ag -i -G “scss$” –ignore “**/target” “inline-image” path/ | awk “{ print $3 }” | sort

to find information on about what paths included images in an inherited project. Until you show me a quicker way to do it using a program with a GUI, I’ll stick to the shell, thank you very much.

I seldom use the command line. I have used bash for git purposes in the past, and I’ll likely try out grunt in the very near future (so I’ll use it more… but scarcely still). However, I am big on using the keyboard instead of the mouse wherever possible. I think if I knew more about the command line or how to take advantage of it I certainly would – specifically for traversing through folder directories, opening and closing files. To be honest, I’m not even aware of everything it is capable of. Any suggestions for tutorials/articles emphasizing its use or how to?

I use it everyday to some extent. Once I had to learn Drupal last year, it was actually used for production instead of just finding the emacs games! Now, at Jaguar/LandRover I’m using Linux/Ubuntu and find myself on the line much of the time even though I’m doing primarily UX/UI graphics.

1000+ commands a day? In 2013? To me, it looks like something went wrong in the evolution of development.

I use the command line everyday, but not nearly as much. It’s probably because I don’t use tools that force me to use it. And it’s not that I’m afraid of commands – I’ve known computer since the late ’80s, and DOS was the way to go – but why do we have to deal with user-unfriendly interfaces just because we can? It’s not that we’re saving resources, you know.

I agree, I feel like recent years we’ve seen the whole terminal usage thing increase (at least in the world of front end dev) and feel that in ways we are going backwards…(not complaining, just observing)

Maybe it’s related to an increasing emphasis on the ‘front end developer’ roles and increase in front end tools that are now integral to general web dev? (git, node, sass, JS development tools, etc. )

I love command line, got 500 with your little script Chris. I wish it were more but I’m still learning. I use Tower for git and I know it slows me down but I don’t know enough about git in general to do more. I do switch back and forth because Tower is just not good for some things.

I also use a Vagrant install for local development and will ssh into that quite a bit. I think the only reason mine isn’t higher is that I’m not a full time developer at this point.

I voted in the poll before seeing the snippet for counting terminal history which reported 499. I wouldn’t have thought the number was anywhere near that high so I’m guessing most of it comes from using Grunt and watch.

Like most people who’ve commented here, I’m also a keyboard guy and find it way faster to use Terminal/command for Git rather than a GUI. Plus, you actually get a feel for what and why you’re doing things. I also use Terminal during the day for traversing folders, creating/deleting files, Compass clean/compile, Sass watch, etc. It’s not that hard; not sure why some people are afraid of using it.

Git, Grunt, Guard, static-site generators, Sass + Compass, and a crapton of other tools for tighter workflows means I’m practically living in my terminal. It only became more true once I realized what could be done with scripting. The terminal made me extremely lazy, in a good way. I think I started to prefer it when I realized productivity within it is only limited by how fast you can type. And partially because my mouse is the less precise peripheral at the moment.

Even then, a good GUI is a joy to behold. I picked Sublime Text for my primary editor partially because it’s gorgeous.

A month ago, I started my first job in the web development field, having never used the command line. Now I use it probably 100 or more times a day. Between Git and Rails, I have iTerm open all day on my computer.

I use the command line several times a day sometimes typing a couple a hundred lines a day. I am an old grey beard who first learned UNIX on a glass TTY and I have always been comfortable to test at a prompt and text editors like vi and emacs, and have done system administration where for remote systems the only thing you have is a shell login, still.

I run Ubuntu 12.04 at the moment and know all about file managers and GUI applications, I love that you can reliably see fonts in web pages, styles, layout, but there are actually many times with a command line does the job better. I will open a terminal if the job involves applying a pattern, a regular-expression, to a whole bunch of files. To move files with a common string in their file name, for example. If I need a pattern from a source file I will use grep and more from the command line.

For administration tasks like changing you web site config or setting up usig a scripting language or a configuration for a framework, a terminal is very useful, especially if you need to use a big font due to poor vision.

What do you use for Git/SVN, Grunt, etc? With just a little bit of studying you’d be able to speed up your productivity in these by learning simple commands. Don’t be so quick to shoot it down because its different then your usual workflow… People use it for a reason.

Couple of times a day.
This is a major part of managing a Linux Server moreover sites like GitHub Requires the use of CLI commands.
If you ask me? i don’t believe the CLI will disappear soon its still a very useful Interface especially will Networking.

As primarily a .Net web developer, I can’t tell you the last time I touched the command line. I think I add like one line to my build script to pre-compile my CSS from SASS/Less, if even that, and I’m done. In fact, I see all these people talking about command line and I completely fail to see when it is useful outside of configuration on a server or computer.

CLI really improves the workflow. It may not look sexy but it does all the dirty work really fast. I’ve just moved from GUI’s to CLI and my efficiency just improved in an absurd way.
There is no way I’m coming back to GUI’s. I won’t lose my time with mouse and clicks…

A dozen or so times a day – I only use it to manage a remote server via ssh, used to use it for running SASS/Compass but now have Hammer for Mac, this involves clicking one icon in the dock, instead of opening a terminal, finding the file path and typing a watch or build or whatever command.

GUIs are quicker for some jobs, terminals are quicker for others. Equally some users prefer GUIs, some prefer CLi.

Great question. I never use the command line, but have this weird inferiority complex where I don’t feel I can call myself a proper developer until I master it! Though I’m now using Grunt and can see myself getting a lot more into it and look forward to the day it’s second nature…until then I’ll go back into a dark room and flog myself like that dude in Broadwalk Empire

I’m definitely going to learn about Grunt and all things command line… But at the moment, I get into work, open up my terminal and run compass watch… that’s it… 8 hours later… command c (or whatever it is)… and home!

@CrisCoyier… I heard you say on your Github video that you feel the command line/shell is “weird and unfinished.” I see what you are saying. However, you have to remember that it is no frills and all power.

By writing your own shell scripts, you can automate ANYTHING on your machine.

Want to automatically git commit everything in a specific directory every Wednesday? It can be done with one little script.

I use terminal for all sorts of stuff: rails commands, rails consol, running tests , silverstripe tests and commands, git, sass, navigating about etc. still not sure it’s above a few hundred per day. Maybe less tea breaks needed…

I am the fan of the terminal commands, when I am free I play with it and try to invent some more tricks beneath it! My favorite commands are grep, find, running tests and the most powerful Git command!

Oh, I use the command line every single day. It’s just really fun and once you get the hang of it, makes a lot of things even faster to do. It also helps that Vim is a pretty fun text editor and really quick to load, allowing for fast editing of simple files. (My heart still belongs to Sublime Text for projects though)

Like landlines, vinyl and VCRs, progress has made them little more than hipster/geek cred. While you have the potential for more power, you have more time to ramp up users to your systems, more confusion, greater margin of error and slower progress overall.

In my enterprise clients (Yahoo, NFL, Walmart, Fox, RedBull, DirecTV), it is rarely more than an “ant clean deploy” for FrontEnd/UX guys like myself and it really should not need to be more than that if you want the average user to be able to work, and intelligently communicate errors to admins.

Every time I have to use the command line I wonder “how hard is it to make a GUI for this?” In fact, there is plenty of software that can reproduce most what you do on the command line, so many times is a preference thing. I worry that using sudo the wrong way, or deleting one of those weird directories is going to screw up my system, so yeah, I wish I used it less.

I think Codekit solves 80% of the stuff I’d be doing on the command line. I would love to see a new version that does the other 20%.

I mean this in the least offensive way, but if you find yourself using the command line hundreds (thousands?) of times a day (for things that aren’t simple like CD etc), you need to focus on automation or improvement.

For example, we had to run a ton of commands in the CLI under ubuntu at my old place,so I wrote a bunch of shell scripts and attached them to events/cronjobs to automate about 25% of my work -and this was only a quick bodge job!

I don’t mean to be offensive in any way, but: There is nearly no option for automation of the work I’m doing on the commandline. You cannot simply assume CLI = the same work environment everywhere. There is a huge difference between folks that happen to work on a very specific task in a big company, folks like me who are full-time freelancing, system administrators at small to middle-sized networking companies / ISP, etc. etc. pp. and thats just the tip of the iceberg!

alias ag=’alias | grep’
Does anyone remember and use this little jewel?
As intended; It Saves me a bunch of typing.
My .bashrc & .bash_aliases files* are ‘huge’ and the ‘ag’ example above helps me find those rusty shortcuts within the very same list that I have #— catergorized — alphabetically and grouped by commands and function… including shortcuts to scripts.
(*redhats & debians –respectively)

ah well .. that tweet above indeed came in handy .. thou I’m using Guake (the Gnome derivate of Yakuake, a Quake-style terminal / commandline), which means I got at least 2 terminal windows open, all handy and readily available at the press of one of your fingers (via F12, in my case).

Most times I’m using the commandline just for taking a look at whats currently running in Clementine, as its just waaaay easier to type in “np [enter]” than moving the mouse into the panel, waiting for it to appear, clicking on the player icon in the traybar, waiting till it opens up, and taking a look on whats playing right now.

Been pretty much a TUI = text user interface man from the start. Initial system was a Commodore 128D in the late 80s, later on it was DOS for years and whatsoever, Windows being just some clicky-colory asset .. so, after stumbling over Linux in 2001 (besides already having had a slight glance in 1994 with SLS / Slackware), it was not THAT of an effort to get accustomed to its commandline.

So, after nearly 8 years of using Unix derivates as primary OS and development environments, GUI is a still a good choice, but the TUI gets most of the daily work done quicker and easier. Of corpse, there is a bit of an effort of digging up all the RTFM loads, but well … other complex systems, like Photoshop, Javascript or your IDE of choice (eg. Visual Studio, Eclipse and even Geany), take about the same effort to learn well, and you probably never will know ALL of it ..

For everyone saying using bash is a status symbol or something, I’d ask how well you know the keyboard shortcuts in your text editor. How many times a day do you use those? Same as bash, those shortcuts took time to learn but now you’re X times more efficient for it. Everything has a learning curve.

There’s quite often a better/more efficient way to do a task, the point is to find that workflow or toolset be it a GUI, CLI or espresso.

Just my $.02. I’m not a fan of people dismissing things out of hand just because they think it’s a status symbol or something. Or quite possibly I’m just too OCD about this shit :)