RE: unix question
- From: "DaShiell, Jude T. CIV NAVAIR 1490, 1, 26" <jude.dashiell@xxxxxxxx>
- To: <programmingblind@xxxxxxxxxxxxx>
- Date: Wed, 6 Oct 2010 07:52:38 -0400
Do not suffix the last directory with (/) and you may get a better result.
-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Lafond, Eileen
Sent: Tuesday, October 05, 2010 17:32
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: unix question
Thanks.
I am testing in my own test region and I was going to attempt to delete the
files in a directory called tutorial. When I added the /tutorial/ to the
mydir, it said not such file or directory. It definitely does exist. I did a
cd tutorial and it appeared in the path so it indeed exists.
I tried another directory path of '/home/faserv/lafonde/Views/' and it said the
same thing with the views directory.
Does anyone have a clue as to why I cannot set it up with the directories that
I want to do the test deletes in?
I have the case set correctly so that is not the issue.
Thanks for any help,
Eileen
-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Øyvind Lode
Sent: Tuesday, October 05, 2010 11:40 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: unix question
The below command should delete all files older than 30 days:
find mydir '/home/faserv/lafonde' -type f -mtime +30 -exec rm -f '{}' \;
On 05.10.2010 19:32, Lafond, Eileen wrote:
> I guess that the type of Unix that we have is as follows:
>
> Sun Microsystems Inc. SunOS 5.10 Generic January 2005
>
> I consider myself a novice, but I write crontabs, cron jobs, sql and bat
> files. My problem is with the actual unix itself as with all the slashes,
> brackets, etc.
>
> I am starting off with a find command to see if I can find the correct files.
> Then I want to do the rm command. I have attempted the man pages in the
> past to no avail. I find them very confusing. I do better with actual
> samples.
>
> Right now I have a question on the find command that I put together somehow
> and it works if I don't have the 'type f' filled in. I thought that that
> meant the type of file. I am looking for all the *.lst files, but I get
> error messages on this. Otherwise this seems to work to find the files for
> me.
>
> find mydir '/home/faserv/lafonde' -type f 'lst' -mtime +30 -exec ls -ld {} \;
>
> Any suggestions?
>
> Thanks,
>
> Eileen La fond
> Work phone: (206) 386-0011
> email: eileen.lafond@xxxxxxxxxxx
>
>
>
> -----Original Message-----
> From: programmingblind-bounce@xxxxxxxxxxxxx
> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Alex Midence
> Sent: Tuesday, October 05, 2010 10:08 AM
> To: programmingblind@xxxxxxxxxxxxx
> Subject: Re: unix question
>
> Be careful with this kind of stuff because your unix variant may make
> you do things slightly differently. Waht kind of unix is it? Is it
> Aix, hpux, solaris, ...? You are sure it is Unix and not Linux?
> Sometimes, people say unix when they mean linux. The are not the same
> thing. They share similarities though and hence the confusion. I
> used to be guilty of this myself. Jim Bauer's instructions look right
> to me but I'd double check your system before you implement them.
>
> Alex M
>
> On 10/5/10, DaShiell, Jude T. CIV NAVAIR 1490, 1, 26
> <jude.dashiell@xxxxxxxx> wrote:
>> No, but I can tell you to do the command info find<enter> or man find
>> <enter> and start taking notes. You may get a few good ideas.
>>
>> -----Original Message-----
>> From: programmingblind-bounce@xxxxxxxxxxxxx
>> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Lafond,
>> Eileen
>> Sent: Monday, October 04, 2010 18:36
>> To: programmingblind@xxxxxxxxxxxxx
>> Subject: unix question
>>
>> Hi,
>>
>> I am a unix novice and I need to write some unix to delete all the files
>> in a directory that are older than 30 days. Can someone help me compose
>> this?
>>
>> Thanks,
>>
>> Eileen La Fond
>> Phone: (206) 386-0011
>> email: eileen.lafond@xxxxxxxxxxx
>> __________
>> View the list's information and change your settings at
>> http://www.freelists.org/list/programmingblind
>>
>> __________
>> View the list's information and change your settings at
>> http://www.freelists.org/list/programmingblind
>>
>>
> __________
> View the list's information and change your settings at
> http://www.freelists.org/list/programmingblind
>
> __________
> View the list's information and change your settings at
> http://www.freelists.org/list/programmingblind
>
__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind
V'lwfڝ!jxʋmx,jm
祊l?+-肶)nX
Other related posts:
- » unix question - Lafond, Eileen
- » Re: unix question - Dorene Cornwell
- » Re: unix question - Jim Bauer
- » Re: unix question - Kerneels Roos
- » RE: unix question - DaShiell, Jude T. CIV NAVAIR 1490, 1, 26
- » Re: unix question - Alex Midence
- » RE: unix question - Lafond, Eileen
- » RE: unix question - DaShiell, Jude T. CIV NAVAIR 1490, 1, 26
- » Re: unix question - Øyvind Lode
- » RE: unix question - Lafond, Eileen
- » RE: unix question - DaShiell, Jude T. CIV NAVAIR 1490, 1, 26
- » RE: unix question - Lafond, Eileen
- » Re: unix question - QuentinC
- » Re: unix question - Bill Gallik
- » RE: unix question - Lafond, Eileen
- » RE: unix question - Lafond, Eileen
- » Re: unix question - Bill Gallik