[Thread Prev][Thread Next][Index]

ask for UNIX expert




I don't have a solution to recover lost files, sorry.

But I do have a procedure that makes my jnl files easy to deal 
with and might help avoid such problems in the future.

1. In any directory from which I want to run ferret, I make
a subdirectory "fjnl".

2. On starting ferret, I execute a startup file that consists
of the following 2 lines:

set mode journal fjnl/ferret.jnl
sp ls -t1 fjnl/* | head -2 | tail -1

This sets the session to write to the fjnl directory, and tells
me the number of the most recent ferret.jnl file there. The result
is that all my jnl files are conveniently at hand, but do not clutter 
up my working directories.

3. I have defined aliases for the following:

alias txjnl       'tx fjnl/ferret.jnl.~\!*~'   (tx is my text editor)
alias wcjnl       'wc fjnl/ferret.jnl.~\!*~'
alias grepjnla    'grep \!* fjnl/*'
alias grepjnln    '/home/pontus/kessler/ferret/grepjnl.com'
   (where grepjnl.com consists of: grep -i $1 fjnl/ferret.jnl.~$2~

These aliases allow easy working with the jnl files.

For example, suppose I want to know how I made the gif file filename.gif:

> grepjnla filename.gif

That tells me which jnl file made it (say it was #233). Now I can see what 
variables I defined in that session:

> grepjnln let 233

Perhaps I want to bring up that file in a text editor for pasting into a 
current session. But first it might be useful to know how many lines it has:

> wcjnl 233
> txjnl 233

And so on. These things make it really easy to work with jnl files, and
reduce clutter and I never would have the need to give a command like
rm *.jnl.

Billy K




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement