Re: Few quick questions
On Sat, 10 Aug 1996, Dan Bergman wrote:
This isn't really germane to Debian, but I'm responding to the list
as an error-checking scheme.
> Well its been a few years since I used unix.. so
Welcome back to the fold; I'm sure you'll find Linux to be at least
as rewarding (and outright fun-ner) than commercial Unices.
> 1. How do I used FIND to find say.. core files and delete em I know that
> it should> look something like this... find -name core -exec rm
The first item on find's command line needs to be the directory that
find starts its looking in; if you're using -exec, you also have to throw in
some stuff (curley braces to show find where to drop in the filenames to give
to the command you're -exec'ing) after the "rm" (in your example). Ie,
find . -name core -exec rm {} \; #starts in your pwd
find /var/spool -name core -exec rm {} \; #starts in /var/spool
find / -name core -exec rm {} \; #starts in /
> 2. How do I use FIND to find files bigger than 1024k and using -ok if i
> want to > delete or not..
For the first half of your question, use "-size +1024k"; to do a
sanity check on whether or not to delete any particular file, I use
rm's "-i" switch, ie
find / -name core -size +1024k -exec rm -i {} \;
> 3. In what ini file do I put my aliases so I get em all the time when I
> start a bash> shell in a xterm window?
By default, xterm windows aren't run as "login shells," though you
can tell them to be by using the "-ls" switch on the command line or throwing
XTerm*loginShell: yes
into your ~/.Xdefaults shell. If an xterm is launched as a login shell,
it'll source ~/.bash_profile . If the xterm in question isn't started as a
login shell, it'll pay attention to ~/.bashrc .
I got tired of having to edit both .bash_profile and .bashrc so I
put everthing to be done regardless of login_shell-ness in a file I call
.bash_common, then have both .bash_profile and .bashrc source it.
> and i'm allso intrested in all kinds of smart tricks to make things easier.
> I was thinking> of putting in a Linux tips 'n tricks on my web page..
Once you have it up, send mail to Matt Welsh (see the LDP homepage
at http://sunsite.unc.edu/mdw/ ) to see if he'll put a link to it in the
LDP pages. He recently added a link to a tips&tricks page
( http://www.hti.net/~moz/linux.htm ) and I can't see why he'd object to
having more.
Luck,
David winters+@pitt.edu aka winters+@cs.cmu.edu
Office: 3503 WeH, x86720
MTFBWY
Reply to: