Hacker News new | ask | show | jobs
by retroafroman 5566 days ago
Start looking into bash scripting, for one. Learning a scripting language like python or perl can do a lot of the same things and is valuable in other ways.

To your comment of looking like just one thing is happening, that is understandable to the untrained mind. Let's take an example where I want to delete all the .bak copies of my old configuration files. To do this I would enter the directory and simply type:

    rm *.bak
It's one command, but the star is expanding it to match every file that has a .bak ending. One command line entry, many executions of the 'rm' command.

Yes, context and a trained eye are everything. I like to think that working on the command line is one of many styles of working. It works very well for me in some situations, so I suggest to others to try it out and see if it would fit their needs as well.

1 comments

Bash is probably the second worst thing unix has to offer, right after vi.

The command you demonstrated is only slightly faster than sorting the directory by type in a file explorer and selecting them with mouse and selecting delete from context menu, and much more dangerous, ie. when you mistype it as rm * .bak you just deleted everything in that folder permanently, whereas in a GUI you would've seen what you actually selected, and most likely only moved them to trash, not permanently deleted them right away.