Change to Previous Working Directory

When working in the Linux or macOS console, I sometimes find myself in a directory I didn’t intend to be in (for example, after accidentially running cd without arguments, which takes you to your home directory). Manually typing the previous path or searching through command history is tedious. Luckily, cd has an option to go back to the previous working directory – simply use: cd -

July 22, 2025 · 1 min · 66 words · Maxim

Monitor Progress of Data Transfer in Console

Linux provides at least two handy command-line tools to monitor data transfer progress: bar and pv. Both display a one-line progress bar with speed, elapsed or estimated time, and provide customizable formatting. Examples with bar: If data size is unknown: dd if=/dev/zero | bar | dd of=/dev/null 2.3GB at 581.8MB/s elapsed: 0:00:04 If data size is known: dd if=/dev/zero iflag=count_bytes count=10G | bar --size 10G | dd of=/dev/null 1.2GB at 592.8MB/s eta: 0:00:15 11% [===== ] Examples with pv: ...

July 21, 2025 · 1 min · 172 words · Maxim