3 ms·
Many people maintain those in a text file, somewhere. My approach is slightly different. I keep them in my shell history file itself. First, set your HISTSIZE
by sergiosgc 5y ago
Many people maintain those in a text file, somewhere. My approach is slightly different. I keep them in my shell history file itself.
First, set your HISTSIZE to 1 trillion. Then, tag the relevant commands in the history file with a comment after the command (e.g. sed -n '5,10p' some.log # print selected lines). It gets searchable within the shell, either by the comment or the start of the command. Always at my fingertips.