VOOZH about

URL: https://thenewstack.io/my-5-favorite-command-line-tools/

⇱ My 5 Favorite Command Line Tools - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2024-10-09 05:00:58
My 5 Favorite Command Line Tools
ato,sponsor-azul,sponsored-post-contributed,
Developer tools / Linux / Programming Languages

My 5 Favorite Command Line Tools

Improve your software development workflow by adding these five CLI tools to your toolbox.
Oct 9th, 2024 5:00am by Pratik Patel
👁 Featued image for: My 5 Favorite Command Line Tools
Featured image by Getty Images for Unsplash+.
Azul sponsored this post.

Whether you’re new to the Linux command line or have been using it for years (or maybe even decades?), I’d like to show you my top five command-line interface (CLI) tools: SDKMAN, eza, ffmpeg, queue and find. You’ll be more productive and feel like a CLI rockstar after reading this article.

Open a terminal and let’s get to know these tools!

1. SDKMAN for Managing JDKs

SDKMAN, which stands for “Software Development Kit Manager,” is a tool for managing multiple SDKs and switching between them easily. Let’s use it to install and manage the Java Development Kit (JDK).

To install it, just follow the simple instructions on the SDKMAN installation page, whether you’re on Linux, MacOS or Windows. I’ll install the free Azul Zulu builds, which is Azul’s completely free build of OpenJDK.

You can list all the available JDKs by typing this from the command line:

sdk list java

This will produce output like this:

👁 `sdk list java` output lists all available JDKs

Since Java 23 just came out, let’s install it! This is simple with SDKMAN; just issue the command:

sdk install java 23-zulu

👁 `sdk install java 23-zulu` installs Java 23 and sets it as default

And voilà, you now have Java 23 installed. You can check that it’s installed and is the default build with the command java -version:

👁 `java -version` confirms installation

You might want to install an older version of Java, and that’s easy enough. For example, you want to install Java 17? Punch this into the console:

sdk install java 17.0.12-zulu

It will ask if you want to set it as the default — that’s up to you. You can easily switch versions on the fly by issuing this command; it will set the JDK you specify within the command as the one that will be used in that shell session:

sdk use java sdk use java 17.0.12-zulu

👁 `sdk use java sdk use java 17.0.12-zulu` sets Java version for current session

2. A Better ls: eza

The ls command is great for listing files, but I prefer to use eza because it color codes the output and knows about symlinks and Git, among other things.

For example, you can specify a tree depth, and it will output all files to that depth:

eza -l –TL3

👁 `eza -l –TL3` lists files to a depth of three

Often, I want to see the directories at the top and the files in a directory after that. You can do that with eza:

eza -al --group-directories-first

👁 `eza -al --group-directories-first` lists files with directories at the top

I use this so often, I created an alias for it:

alias ll="eza -al --group-directories-first"

So now I just type ll and it formats and orders the output so that it’s faster for me to find something.

3. A/V Swiss Army Knife: ffmpeg

The ffmpeg tool is a comprehensive command for working with audio and video files. It can do anything: resize video files, output the audio from a video file to MP3, convert from different video formats, and so much more. There are some great tutorials and books onffmpeg, but I’d like to show you an example of how to resize a 1080p video file to 480p.

ffmpeg -i ./AltantaTimeLapse.mp4 -vf scale=-1:480 -c:v libx264 -crf 0 -preset veryslow -c:a copy AltantaTimeLapse-480.mp4

The scale option tells ffmpeg to resize and preserve the aspect ratio (as I’m only providing one dimension: scale=-1:480.) It’s also telling ffmpeg to copy the audio, as I don’t need to change that.

Here’s both the original and downsized video file on my desktop so you can see the difference:

👁 Original and downsized video files

If you’d like to learn more, I recommend this in-depth tutorial on ffmpeg.

4. Multi-Step Job Processing with Pueue

The pueue command is short for “process a queue” — or as its website says, “Pueue is a command-line task management tool for sequential and parallel execution of long-running tasks.” It’s a super useful command for when you don’t want to sit at your computer to run a series of commands that take a lot of time. Or just as a way to automate a bunch of commands, so you can get that cup of Java and take a break.

We just used ffmpeg to process a video file, which will take some time (and depending on the length or resolution of the video, it could take a long time). Let’s do these things with pueue, so we don’t need to babysit our task:

  1. Process the files (resize).
  2. Move them to a folder called Finished using the find command.

Install pueue using your system’s package manager, then make sure the daemon for it is running:

pueued –d

👁 `pueued –d` installs pueued and starts the daemon

Now queue up the ffmpeg command:

pueue add -- ffmpeg -i ./AtlantaTimeLapse.mp4 -vf scale=-1:480 -c:v libx264 -crf 0 -preset veryslow -c:a copy AtlantaTimeLapse-480.mp4

Also queue the command to move the files into a folder called Finished:

pueue add -- find . -type f -name "*480p*" -exec mv {} finished/

Type the command pueue to see what’s in the queue and its status:

👁 `pueue` command shows what's in the queue.

5. Don’t Hunt; Use Find

The Unix find command is a great tool to save time when you’re looking for files. You can even use it to run a command against the files that are found. You can find files by type, name, attribute, etc. We used the find command above to move processed files:

find . -type f -name "*480p*" -exec mv {} finished/

The . says to find files starting in this directory.

Let’s look at the options.

  • Find file only (no directories): -type f
  • Find files with 480p in the filename: -name "*480p*"
  • Execute a command on found files: -exec mv {} finished

The exec flag says, “Execute the mv command for each thing the find command finds.” The {} are used to substitute the file or directory found.

There are a ton of options, and I recommend this tutorial for getting started.

Conclusion

We’ve stepped through five command-line tools I find invaluable for day-to-day work when developing software. I hope you were able to add a few new tools to your toolbelt!

Learn more by registering for All Things Open 2024, where you can hear Pratik and other open source experts share their insights and knowledge.

Azul provides the Java platform for the modern cloud enterprise. Millions of Java developers, hundreds of millions of devices, and the world’s most highly regarded businesses trust Azul to power their applications with exceptional capabilities, performance, security, value and success.
Learn More
The latest from Azul
TRENDING STORIES
Pratik Patel is a Java Champion and VP of Developer Relations at Azul Systems. He is an all around software and hardware enthusiast with experience in software engineering in the travel, healthcare, telecom, financial services, and startup sectors. He wrote...
Read more from Pratik Patel
Azul sponsored this post.
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.