abbadon420@sh.itjust.works to Ask Lemmy@lemmy.world · 16 hours agoLinux question: I like to browse using ls. Than when I find what I'm looking for, I would like to directly move there with cd without having to retype the path. Is there an elegant solution for that?message-squaremessage-square18linkfedilinkarrow-up159arrow-down10file-text
arrow-up159arrow-down1message-squareLinux question: I like to browse using ls. Than when I find what I'm looking for, I would like to directly move there with cd without having to retype the path. Is there an elegant solution for that?abbadon420@sh.itjust.works to Ask Lemmy@lemmy.world · 16 hours agomessage-square18linkfedilinkfile-text
Maybe there is a tool that does that? Maybe I’m doing this all wrong and there is a different way I should browse?
minus-squarevalar@lemmy.calinkfedilinkarrow-up42·16 hours agoTo add, !$ gets replaced with the last word from the previous command line !! Repeats the most recent command !-N Repeats the Nth previous command !string Repeats the most recent command that began with ‘string’
minus-squarem-p{3}@lemmy.calinkfedilinkarrow-up18·15 hours ago!! is the goat when you needed to run the last command using sudo
minus-squareccunning@lemmy.worldlinkfedilinkarrow-up2arrow-down1·16 hours agoHuh - TIL about !-N Thanks 🙏
To add,
!$ gets replaced with the last word from the previous command line
!! Repeats the most recent command
!-N Repeats the Nth previous command
!string Repeats the most recent command that began with ‘string’
!!is the goat when you needed to run the last command usingsudo💯
I’m loving this
Huh - TIL about !-N
Thanks 🙏