Post #1817718
2026-04-30 18:32 UTC
RE: https://social.tchncs.de/@cark/116459954767698913
#TIL You can copy or rename files without retyping the path:
❯ cp /your/long/path/config.toml{,.bak}
This expands to:
cp /your/long/path/config.toml /your/long/path/config.bak
Works also with `echo` (nice for testing).
Thanks to @irom@social.tchncs.de for recently pointing me in this direction. 👍️
#bash #linux #cli
Replies (3)
-
@north@xn--8r9a.com 2026-04-30 22:00
@cark @irom Bash is the best programming language. I'll die on that hill.
-
@kevin@mastodon.km6g.us 2026-04-30 22:04
@cark @irom Sometimes figuring out the proper expansion to get the right result takes longer than typing the path you wanted to avoid.
-
@ryan@social.binarydad.com 2026-05-02 14:29
@cark @irom im writing these down...