abbadon420@sh.itjust.works to Ask Lemmy@lemmy.world · 3 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-square62linkfedilinkarrow-up1128arrow-down11file-text
arrow-up1127arrow-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 · 3 days agomessage-square62linkfedilinkfile-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-squareExec@pawb.sociallinkfedilinkarrow-up22·3 days ago!!:n where n is the nth word after the command in your last line cp file1 file2 nano !!:2 Here nano opens file2.
!!:nwhere n is the nth word after the command in your last linecp file1 file2 nano !!:2Here nano opens file2.
Love it