Re: search by date

2006-01-10 Thread Harley D. Eades III

Chris Collins wrote:


Hello

Can somebody tell me how to search for files by the date they were created.
Maybe somebody has a script they have created and would like to share. I
have about 5000 files in different directories I would like to backup crated
prior to 2003 and then delete. Any ideas?

Thanks
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

 


I am not sure this is possible, due to the filesystem not storing
the creation date in the inode.

Cheers
Harley
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: shell script doesnot executing

2005-12-17 Thread Harley D. Eades III
On Fri, 2005-12-16 at 23:17 -0800, James Long wrote:
> > Message: 24
> > Date: Fri, 16 Dec 2005 01:51:22 -0600
> > From: "Harley D. Eades III" <[EMAIL PROTECTED]>
> > Subject: Re: shell script doesnot executing
> > To: Anirban Adhikary <[EMAIL PROTECTED]>
> > Cc: freebsd-questions@freebsd.org
> > Message-ID: <[EMAIL PROTECTED]>
> > Content-Type: text/plain
> > 
> > On Fri, 2005-12-16 at 11:23 +0530, Anirban Adhikary wrote:
> > >   Hi guys
> > > This is Anirban here. I have the problem again with the previous shell
> > > script.Which was
> > > Write a shell script that will check whether a server is up or not(on 
> > > ping)
> > > & log the report to a file.
> > > 
> > > I have tried to write the program in the following way
> > > 
> > > #! /bin/sh
> > > echo -n "Enter the IP or Hostname of the Server"
> > > read host
> > > #echo $host
> > > ping -c2 $host &>file2
> > > if [ $? = 0 ];then
> > The problem is you're checking the exit status of ping, even if the host
> > is down ping is exiting with a successful status.  You need to use sed
> > or awk or something similiar to test for replys.
> 
> That is false.  ping exits with a true result code if at least one
> ICMP reply is received, false otherwise.
Yup, if you read the entire thread, I openly admit that.
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=2178259+0
+current/freebsd-questions

Cheers
-- Harley
-BEGIN GEEK CODE BLOCK-
G: GCS-- d- a? C B- E+++ W+++ N++ w--- X+++ b++ G e* r x+ z+
--END GEEK CODE BLOCK--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: how to dual boot

2005-12-16 Thread Harley D. Eades III
On Fri, 2005-12-16 at 16:31 -0500, Marty Landman wrote:
> I'm trying to get a dual boot system set up with FBSD 5.3 and Win XP sp1.
> First I installed FBSD using 15GB of the HD, then installed XP on the
> remaining 5GB. However now it boots up XP automatically. I can get back to
> the FBSD installer by booting from the 5.3 CD but what do I do to provide a
> choice of which to boot right on the HD?
If you can get to freebsd use the freebsd bootloader and renable it
via fdisk -B -b /boot/boot0 device, or you could install grub and use
it.

see:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot-blocks.html
and
http://www.pl.freebsd.org/doc/en_US.ISO8859-1/articles/multi-os/article.html

Cheers && _GOOD_LUCK_

-- Harley
-BEGIN GEEK CODE BLOCK-
G: GCS-- d- a? C B- E+++ W+++ N++ w--- X+++ b++ G e* r x+ z+
--END GEEK CODE BLOCK--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: C++ compile error

2005-12-16 Thread Harley D. Eades III
On Fri, 2005-12-16 at 10:41 -0500, Louis J. LeBlanc wrote:
> On Fri, December 16, 2005 10:33 am, Nathan Vidican wrote:
> > David Miao wrote:
> >> Dear list,
> >>
> >> I try to compile a hello world C++ program in FreeBSD 6.0, but get an
> >> error as below:
> >>
> >> [EMAIL PROTECTED] ~/cpp]% CC -o hello hello.C
> >> hello.C: In function `int main()':
> >> hello.C:5: error: `cout' undeclared (first use this function)
> >> hello.C:5: error: (Each undeclared identifier is reported only once
> >> for each function it appears in.)
> >> hello.C:5: error: `endl' undeclared (first use this function)
> >>
> >> I noticed that "iostream" file is located in
> >> "/usr/include/c++/3.4/iostream", I guess my CC compiler cannot find
> >> this head file. Is it true? And how can I fix this problem? Your
> >> advice is appreciated. Thanks in advance.
> >>
> >> ==quote of hello world code==
> >> #include 
> >>
> >> int main()
> >> {
> >> cout << "Hello World!" << endl;
> >>
> >> return 0;
> >> }
> >> == end of quote==
> >>
> >> Regards,
> >> David
> >> ___
> >> freebsd-questions@freebsd.org mailing list
> >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> >> To unsubscribe, send any mail to
> >> "[EMAIL PROTECTED]"
> >>
> >>
> >>
> >
> > Also, noticed your code is flawed, you never used a namespace, nor
> > explicitly stated one. cout is part of the 'std' namespace, so either
> > ' using namespace std;' for global/local use of namespace, OR do
> > 'std::cout <<' instead. Try the hello.cpp I sent you in the last email,
> > that one should work for ya :)
> 
> I'm not nearly as adept with C++ as I am with C, Perl, and a few other
> geek tools, but doesn't C++ default to the std namespace if none is
> specified?
> 
> Perhaps this is a compiler specific behavior?
No, you have to either tell the compiler by using "std::METHOD" or say
using namespace std; to annouce you are using std as your primary
namespace.

-- Harley 
-BEGIN GEEK CODE BLOCK-
G: GCS-- d- a? C B- E+++ W+++ N++ w--- X+++ b++ G e* r x+ z+
--END GEEK CODE BLOCK--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: shell script doesnot executing

2005-12-16 Thread Harley D. Eades III
On Fri, 2005-12-16 at 11:23 +0530, Anirban Adhikary wrote:
>   Hi guys
> This is Anirban here. I have the problem again with the previous shell
> script.Which was
> Write a shell script that will check whether a server is up or not(on ping)
> & log the report to a file.
> 
> I have tried to write the program in the following way
> 
> #! /bin/sh
> echo -n "Enter the IP or Hostname of the Server"
> read host
> #echo $host
> ping -c2 $host &>file2
> if [ $? = 0 ];then
> echo "Server is up and working" $host
> else
> echo"Server is not up and not working" $host
> fi
I reworked your script a bit, it is working for me maybe it will for
you:
#! /bin/sh
echo -n "Enter the IP or Hostname of the Server: "
read host


ping -c2 $host > file2;
if `test $? = 0`; then
echo "Server is up and working" $host
else
echo "Server is not up and not working" $host
fi

TEST:
hde{/usr/home/hde} $ ./test.sh
Enter the IP or Hostname of the Server: 193.169.1.1
Server is up and working 193.169.1.1
hde{/usr/home/hde} $ ./test.sh
Enter the IP or Hostname of the Server: 193.169.1.111
Server is not up and not working 193.169.1.111
hde{/usr/home/hde} $ cat file2
PING 193.169.1.111 (193.169.1.111): 56 data bytes

--- 193.169.1.111 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
hde{/usr/home/hde} $


-- Harley
-BEGIN GEEK CODE BLOCK-
G: GCS-- d- a? C B- E+++ W+++ N++ w--- X+++ b++ G e* r x+ z+
--END GEEK CODE BLOCK--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: shell script doesnot executing

2005-12-16 Thread Harley D. Eades III
On Fri, 2005-12-16 at 01:51 -0600, Harley D. Eades III wrote:
> On Fri, 2005-12-16 at 11:23 +0530, Anirban Adhikary wrote:
> >   Hi guys
> > This is Anirban here. I have the problem again with the previous shell
> > script.Which was
> > Write a shell script that will check whether a server is up or not(on ping)
> > & log the report to a file.
> > 
> > I have tried to write the program in the following way
> > 
> > #! /bin/sh
> > echo -n "Enter the IP or Hostname of the Server"
> > read host
> > #echo $host
> > ping -c2 $host &>file2
> > if [ $? = 0 ];then
> The problem is you're checking the exit status of ping, even if the host
> is down ping is exiting with a successful status.  You need to use sed
> or awk or something similiar to test for replys.
Actually, I just tested this and I am wrong.  Ping does exit with a
error status when there are no replys sorry.


-- Harley
-BEGIN GEEK CODE BLOCK-
G: GCS-- d- a? C B- E+++ W+++ N++ w--- X+++ b++ G e* r x+ z+
--END GEEK CODE BLOCK--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: shell script doesnot executing

2005-12-15 Thread Harley D. Eades III
On Fri, 2005-12-16 at 11:23 +0530, Anirban Adhikary wrote:
>   Hi guys
> This is Anirban here. I have the problem again with the previous shell
> script.Which was
> Write a shell script that will check whether a server is up or not(on ping)
> & log the report to a file.
> 
> I have tried to write the program in the following way
> 
> #! /bin/sh
> echo -n "Enter the IP or Hostname of the Server"
> read host
> #echo $host
> ping -c2 $host &>file2
> if [ $? = 0 ];then
The problem is you're checking the exit status of ping, even if the host
is down ping is exiting with a successful status.  You need to use sed
or awk or something similiar to test for replys.

-- Harley
-BEGIN GEEK CODE BLOCK-
G: GCS-- d- a? C B- E+++ W+++ N++ w--- X+++ b++ G e* r x+ z+
--END GEEK CODE BLOCK--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: this AMD motherboard?

2005-12-14 Thread Harley D. Eades III
On Wed, 2005-12-14 at 18:16 -0800, Gary Kline wrote:
>   Can anyone tell if the graphics chips on this card will  work
>   with X?
> 
>   If not, then does anybody have an idea of what kinds of cards
>   are better/worse?
> 
>   thanks in advance,
> 
>   gary
> 
> 
> http://www.ecs.com.tw/ECSWeb/Products/ProductsDetail.aspx?DetailID=422&MenuID=24&LanID=9
> 
> 
Current Xorg is well equipt for newer video cards, I don't see you
having any problems.  But, I cannot be for sure since I have never used
this mother-board before.  
-- 
-BEGIN GEEK CODE BLOCK-
G: GCS-- d- a? C B- E+++ W+++ N++ w--- X+++ b++ G e* r x+ z+
--END GEEK CODE BLOCK--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: grub doesn't know ufs filesystem

2005-12-14 Thread Harley D. Eades III
On Wed, 2005-12-14 at 08:36 -0800, Micah wrote:
> Roberto Nunnari wrote:
> > Hello list.
> > 
> > Please also reply to my mailbox, as I'm not on the list.
> > Thank you.
> > 
> > I have a old grub floppy that I use time to time to
> > boot/recover pc with different OS.. Today I wanted to
> > boot a freebsd 5.3-RELEASE-p23 box, but to my surprise
> > grub reported:
> > 
> > Filesystem type unknown, partition type 0xa5
> > 
> > and thus cannot mount /boot/loader
> > 
> > So I thought I'd make a grub floppy with a recent version,
> > but even with version 0.97 things won't change..
> > 
> > # cd /usr/ports/sysutils/grub
> > # make install
> > # grub
> >  [ Minimal BASH-like line editing is supported.  For the first word, TAB
> >lists possible command completions.  Anywhere else TAB lists the 
> > possible
> >completions of a device/filename. ]
> > 
> > grub> root (hd0,0,a)
> >  Filesystem type unknown, partition type 0xa5
> > 
> > grub> kernel /boot/loader
> > 
> > Error 17: Cannot mount selected partition
> > 
> > grub> root (hd0, 
> >  Possible partitions are:
> >Partition num: 0, [BSD sub-partitions immediately follow]
> >  BSD Partition num: 'a',  Filesystem type unknown, partition type 0xa5
> >  BSD Partition num: 'b',  Filesystem type unknown, partition type 0xa5
> >  BSD Partition num: 'd',  Filesystem type unknown, partition type 0xa5
> >  BSD Partition num: 'e',  Filesystem type unknown, partition type 0xa5
> >  BSD Partition num: 'f',  Filesystem type unknown, partition type 0xa5
> > 
> > grub> quit
> > 
> > # mount
> > /dev/ad0s1a on / (ufs, local, soft-updates)
> > devfs on /dev (devfs, local)
> > /dev/ad0s1e on /tmp (ufs, local, soft-updates)
> > /dev/ad0s1f on /usr (ufs, local, soft-updates)
> > /dev/ad0s1d on /var (ufs, local, soft-updates)
> > linprocfs on /usr/compat/linux/proc (linprocfs, local)
> > devfs on /var/named/dev (devfs, local)
> > 
> > Any hint/thought/advice?
> > 
> > Best regards.
> 
> I just installed grub from ports and duplicated your test and it works 
> fine.  I'd start by checking your installation and making sure you don't 
> have any other grubs in your path.  Some of the grubs that ship with 
> Linux distros do not support ufs.  Do a find/locate on grub to see what 
> turns up.  Do a which grub, you should get /usr/local/sbin/grub.  If 
> not, issue /usr/local/sbin/grub from a command prompt and duplicate your 
> test.  If that's broken, make sure your ports tree is up to date, make 
> sure /usr/ports/devel/autoconf259 /usr/ports/devel/automake19 
> /usr/ports/devel/gmake are up to date (grub's build dependancies) then
> deinstall, clean, and reintsall the grub port.
> 
> 
> HTH,
> Micah
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

I can second this, I use grub all the time, as well as test grub2 on
FreeBSD and both work great for me.

--Harley 
-BEGIN GEEK CODE BLOCK-
G: GCS-- d- a? C B- E+++ W+++ N++ w--- X+++ b++ G e* r x+ z+
--END GEEK CODE BLOCK--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Locale problems with perl

2005-12-14 Thread Harley D. Eades III
On Wed, 2005-12-14 at 12:42 +0100, Frank Steinborn wrote:
> Erik Norgaard wrote:
> > Hi,
> > 
> > I recently (two weeks ago) upgraded my system and all ports. But since 
> > then, whenever I install some perl module I get something like this:
> > perl: warning: Setting locale failed.
> > perl: warning: Please check that your locale settings:
> > LC_ALL = (unset),
> > LANG = "en_GB.ISO_8859-1"
> > are supported and installed on your system.
> > perl: warning: Falling back to the standard locale ("C").
> 
> It seems that perl has to be build at last. So if you upgrade some
> port depending on perl and build perl afterwards, you will run into
> this problem. Donk ask me why this is, but it worked for me. 
> 
> Frank
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
See section LOCALE PROBLEMS in `perldoc perllocale` for solutions to
this error.


--Harley 
-BEGIN GEEK CODE BLOCK-
G: GCS-- d- a? C B- E+++ W+++ N++ w--- X+++ b++ G e* r x+ z+
--END GEEK CODE BLOCK--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Lost BOOT menus

2005-12-12 Thread Harley D. Eades III
On Mon, 2005-12-12 at 13:53 +0100, O. Hartmann wrote:
> Hello.
> After some tests and investigations and fiddling around with RAID and
> partitioning, I lost the boot menu that is shown when FreeBSD 6.0 starts
> up. Can anyone help me and tell how to reinstall? Thanks.
Check the handbook:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot-blocks.html

IIRC this should work,



Example 12-2. boot2 Screenshot

>> FreeBSD/i386 BOOT
Default: 0:ad(0,a)/kernel
boot:
If you ever need to replace the installed boot1 and boot2 use
disklabel(8):

# disklabel -B diskslice

where diskslice is the disk and slice you boot from, such as ad0s1 for
the first slice on the first IDE disk.

Dangerously Dedicated Mode: If you use just the disk name, such
as ad0, in the disklabel(8) command you will create a
dangerously dedicated disk, without slices. This is almost
certainly not what you want to do, so make sure you double check
the disklabel(8) command before you press Return.



But, read through the bootlabel(8) man to be sure.

Cheers
Harley 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"