abbadon420@sh.itjust.works to Ask Lemmy@lemmy.world · 15 days 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-square3linkfedilinkarrow-up10arrow-down10file-text
arrow-up10arrow-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 · 15 days agomessage-square3linkfedilinkfile-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-squareccunning@lemmy.worldlinkfedilinkarrow-up1·15 days agoYou mean something like this? ls /your/long/path/name cd !$
minus-squarevalar@lemmy.calinkfedilinkarrow-up1·15 days 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-squarevillage604@adultswim.fanlinkfedilinkEnglisharrow-up1·15 days agoI just learned more about Linux than I did from my whole IT degree.
You mean something like this?
ls /your/long/path/namecd !$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’
I just learned more about Linux than I did from my whole IT degree.