Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosfreeCodeCamp.org: TimescaleDB Course – PostgreSQL for Time-Series Data(23.09.2026 um 12:30 Uhr)
Windows Tipps & SecurityAndroid 17: Rollout auf Samsung-Galaxy-Smartphones verzögert sich(23.09.2026 um 11:42 Uhr)
Unix & Linux ServerUSN-8733-2: Gzip vulnerabilities(22.09.2026 um 18:04 Uhr)
Sichere ProgrammierungHow to Build Custom PowerPoint Add-Ins for Enterprise Teams(23.09.2026 um 11:25 Uhr)
Sichere ProgrammierungSearch Google Jobs in Real-Time with Go and SerpApi 🚀(23.09.2026 um 12:13 Uhr)
Sichere ProgrammierungA Psychological State is a Coefficient Vector(23.09.2026 um 12:16 Uhr)
YouTube Security VideosfreeCodeCamp.org: TimescaleDB Course – PostgreSQL for Time-Series Data(23.09.2026 um 12:30 Uhr)
Windows Tipps & SecurityAndroid 17: Rollout auf Samsung-Galaxy-Smartphones verzögert sich(23.09.2026 um 11:42 Uhr)
Unix & Linux ServerUSN-8733-2: Gzip vulnerabilities(22.09.2026 um 18:04 Uhr)
Sichere ProgrammierungHow to Build Custom PowerPoint Add-Ins for Enterprise Teams(23.09.2026 um 11:25 Uhr)
Sichere ProgrammierungSearch Google Jobs in Real-Time with Go and SerpApi 🚀(23.09.2026 um 12:13 Uhr)
Sichere ProgrammierungA Psychological State is a Coefficient Vector(23.09.2026 um 12:16 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Terminal Tools, Shell Aliases, and directory bookmarks

I like using terminal tools and programs. They are so handy that you can't ignore once you get used to them. There are many of them at your disposal, each doing something which is unique in their own. They do their own thing best, and…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

I like using terminal tools and programs. They are so handy that you can't ignore once you get used to them. There are many of them at your disposal, each doing something which is unique in their own.



They do their own thing best, and they work with each other. Take a look at Unix Philosophy to understand the guiding principles that these tools follow to make them so easy to work with!



As I begin using these tools and the many ways in which they allow composability, I found myself using such composed commands and even scripts. Here's one that allows me to move to frequently used directories without typing the path everytime, from any directory I'm in!






Directory bookmarks



We use cd a lot in terminal. It allows us to change to the directory we want to work on. As I started using fzf, finding a specific subdirectory became much more easier than before. I can type in cd $(fzf) and it will open up a search window where I can fuzzy-search for a specific directory. I can write a shell alias like alias cdf="cd $(fzf)" and then I can just type in cdf and press return to activate the command. Its great!



But still, when I'm deep in a particular directory and I wanted to move to another directory which is not a sub dir this gives me a problem. Because the required directory that I want to move into is not a subdirectory, I can't just cdf any more (atleast not from the current dir). I have to move up the directory structure untill the required directory becomes a subdir to the present working directory. This is inadequate!



What if I can store certain directories that I frequently cd into, somewhere in a file, and then use fzf to match and cd into whichever one I want. That would be awesome!



That's what I built with dmk (directory bookmark). Its a set of two shell aliases to help me navigate to any directory with ease. From anywhere!!!






Marking directories as bookmarks



First things first, I need a way to mark certain directories as important so that I can come back to them when needed. For this, I just need to save the directory path into a file.



If I run the command pwd >> ~/.dmks, the present working directory path gets appended to a file called .dmks in my home directory ~. Here, pwd command prints the present working directory to terminal, and >> causes that output to get appended to the filename provided after.



For simpler frequent usage, I created an alias alias dmk="pwd >> ~/.dmks". I added this command into my shell init rc file ~/.bashrc and the alias is available from any shell window I open next.






Moving into a bookmarked directory



Okay, now that we have a way of marking directories by saving their path into a file, its time to use fzf to move into one.



For this I run the command cd $(cat ~/.dmks | fzf). This moves into the directory which is given by the sub-shell command cat ~/.dmks | fzf. Whatever is the output of this sub-shell command gets used by cd and it will cause the change in working directory. It's key to note that, cat ~/.dmks prints the content of the file ~/.dmks into the shell and because of the pipe operator | it gets passed on to fzf. This file has all of our marked directories which we marked with dmk and this list is passed on to FZF. FZF then shows an interactive search window, from which we can search the required directory from the list of marked directories and select the one we need.



Again, to help simplify running this command regularly, I have created a shell alias for this too! alias cdmk="cd \$(cat ~/.dmks | fzf)" creates an alias and I write this command in the shell rc file ~/.bashrc to make it available in any new shell window as well.



Note the escape character \ is required before $ when writing into the shell rc file! Otherwise, the shell will execute the command itself when initializing the alias! We don't want that! We want us to be able to use the alias, and when we do that, we need the command to run!



That is that, and I get directory bookmark system available in any of my shell window!!! dmk and cdmk!!!



P.S. here is the link to the gist containing the aliases.



Cheers!

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Terminal Tools, Shell Aliases, and directory bookmarks

Thematisch verwandte Begriffe: Terminal, Tools, Shell, Aliases · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-96258 | A vulnerability has been found in onSite internet GmbH Auktion NG Auktio…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick