:: HOME_FILTER[]

Show or hide homepage blocks. Filter pills match each section’s panel title (below).

Topic

:: LATEST[]

:: Shellcraft Daily #2

:: SHELLCRAFT_DAILY · #2 > Second Entry · shellcraft_daily.log

pushd and popd — The Directory Stack Most People Never Use

The tip

Tired of typing cd back and forth between projects, or losing your place when you jump around the filesystem? Bash (and zsh) has a built-in directory stack that remembers your navigation history so you can push new folders and pop back instantly — no more long cd paths.

How to use it

Bash
pushd ~/projects/web-app          # push current dir and cd into web-app
pushd ~/projects/api-server       # push web-app and cd into api-server
pushd /tmp                        # push api-server and cd into /tmp

popd                              # pop /tmp and return to api-server
popd                              # pop api-server and return to web-app
popd                              # pop web-app and return to where you started

Pro moves

Bash
dirs                  # show the full directory stack
dirs -v               # show with numbers (numbered list)
pushd +1              # rotate to the next directory in the stack
pushd -1              # rotate the other way
pushd ~               # push your home directory
cd -                  # quick toggle between the last two directories (shortcut for pushd/popd)

Bonus aliases

Add to your ~/.bashrc or ~/.zshrc for daily use:

Bash
alias pd='pushd'
alias bd='popd'
alias d='dirs -v'

Once you start using pushd / popd, you’ll never go back to normal cd navigation when working on multiple projects or deep folder structures. It’s one of those small things that makes heavy terminal use feel professional.

:: Weekly Challenge: ['Level 1']

> LEVEL_1: THE_QUICK_DECODER

> MISSION: DECODE WITH SHELL ONLY (NO WEB / PYTHON)

A developer left a flag hidden using the most common encoding method on the planet. Decode the ciphertext below.

ZmxhZ3tzaGVsbGNyYWZ0X2lzX2Vhc3lfbW9kZX0=

> RULES: one-liner or short pipeline · answer is flag{...}

> DIFFICULTY: Level 1 (beginner)

> HINT (if stuck after ~2 min): the tool you need ships on every Linux and macOS install.

root@emptyarray:~#

:: DONATE()

:: ONLINE[]

Libera

nick emptyarray

libera.chat

Channels

  • #archlinux
  • #crypto
  • #exploit-db
  • #hackers
  • #linux
  • #nolog

Discord

emptyarray

X

@arrayempty