Subject: Few quick questions

From: "Dan Bergman" <[email-masked]>
Date: Sat, 10 Aug 1996 18:06:24 +0200

Well its been a few years since I used unix.. so

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

2. How do I use FIND to find files bigger than 1024k and using -ok if i
want to 
delete or not..

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?

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..

---

From: David C Winters <[email-masked]>
Date: Sat, 10 Aug 1996 14:49:18 -0400 (EDT)

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.

> 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 /

> 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 {} \;

> 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.

> 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 [email-masked] aka [email-masked]
Office: 3503 WeH, x86720
MTFBWY

---

From: Shaya Potter <[email-masked]>
Date: Mon, 12 Aug 1996 09:40:57 -0400 (EDT)

> look something like this...  find -name core -exec rm

find / -name core -exec rm {} \;
     |                      |
     |                      |-find places the file name in here and then 
     |			      executes the command
     |-the direcotory you want to start searching from 
 
> 3. In what ini file do I put my aliases so I get em all the time when I

put them in both .bash_rc and .bash_profile in your home directory
 
> of putting in a Linux tips 'n tricks on my web page..

Hope this helps

Shaya 
---
Shaya Potter
[email-masked]

---

From: [email-masked] (Gilbert Ramirez Jr.)
Date: Mon, 12 Aug 1996 11:55:30 -0500 (CDT)

> put them in both .bash_rc and .bash_profile in your home directory

You can also start xterm as a login-shell with:

xterm -ls &

As a login shell, it will read the /etc/profile and ~/.profile files.

Is this method frowned upon? I like it so I don't have to duplicate settings
in .bashrc   

--gilbert

______________________________________________________________________
Gilbert Ramirez Jr.                     [email-masked]
University of Texas                     http://merece.uthscsa.edu/gram
Health Science Center at San Antonio    University Health System