From: gyro on 28 Nov 2009 11:49 Hi, Does anyone know how to save and restore the directory stack in bash? I would like to be able to access and manipulate past directories between logins. Thanks. -g
From: mop2 on 28 Nov 2009 12:27 On Sat, 28 Nov 2009 14:49:03 -0200, gyro <gyromagnetic(a)gmail.com> wrote: > Hi, > Does anyone know how to save and restore the directory stack in bash? > I would like to be able to access and manipulate past directories > between logins. Which stack? Well, you can create a file and routines for this purpose, or: If your request is for command line, possibly you can do this: grep search /etc/inputrc "\e[A": history-search-backward "\e[B": history-search-forward Add the above lines to correspondent file. set|grep HIS HISTCONTROL=ignorespace:erasedups HISTFILE=/root/.bash_history HISTFILESIZE=500 HISTSIZE=500 Add "erasedups" to your HISTCONTROL. Then, at prompt, you write cd and press key "up" and only commands started by "cd" are showed, then select the desired one. This solution works in command line only.
From: Bill Marcum on 28 Nov 2009 12:32 On 2009-11-28, gyro <gyromagnetic(a)gmail.com> wrote: > Hi, > Does anyone know how to save and restore the directory stack in bash? > I would like to be able to access and manipulate past directories > between logins. > I don't know if that's possible, but you can set the CDPATH variable, or you can search for previous "cd" commands in the shell history. I like to use mc. In mc you can have a bookmark list, like in a web browser.
From: yard-ape on 28 Nov 2009 12:44 gyro wrote: > Hi, > Does anyone know how to save and restore the directory stack in bash? > I would like to be able to access and manipulate past directories > between logins. Better to do it externally: http://www.xs4all.nl/~waterlan/ -yard-ape
From: gyro on 28 Nov 2009 14:57 On Nov 28, 10:27 am, mop2 <inva...(a)mail.address> wrote: > On Sat, 28 Nov 2009 14:49:03 -0200, gyro <gyromagne...(a)gmail.com> wrote: > > Hi, > > Does anyone know how to save and restore the directory stack in bash? > > I would like to be able to access and manipulate past directories > > between logins. > > Which stack? > Well, you can create a file and routines for this purpose, or: > > If your request is for command line, possibly you can do this: > > grep search /etc/inputrc > "\e[A": history-search-backward > "\e[B": history-search-forward > > Add the above lines to correspondent file. > > set|grep HIS > HISTCONTROL=ignorespace:erasedups > HISTFILE=/root/.bash_history > HISTFILESIZE=500 > HISTSIZE=500 > > Add "erasedups" to your HISTCONTROL. > > Then, at prompt, you write cd and press key "up" and only > commands started by "cd" are showed, then select the > desired one. > > This solution works in command line only. Hi, The bash docs uses the term 'directory stack': http://www.faqs.org/docs/bashman/bashref_73.html -g
|
Next
|
Last
Pages: 1 2 3 4 Prev: To swap the application to firefox Next: Nail mailrc save/write 'no active mailbox' |