Containing files?


log in

Advanced search

Questions and Answers : Macintosh : Containing files?

Author Message
Colin
Send message
Joined: 3 Apr 99
Posts: 9
Credit: 40,998
RAC: 0
United States
Message 910 - Posted: 24 Jun 2004, 1:00:12 UTC

Anyone know how to keep boinc from spewing work files all over my home directory? Even if I put it in its own directory it keeps putting its files in my home folder.

Profile AthlonRob
Volunteer developer
Avatar
Send message
Joined: 18 May 99
Posts: 378
Credit: 7,041
RAC: 0
United States
Message 1038 - Posted: 24 Jun 2004, 7:31:59 UTC

Yes, you must actually run it from the new directory you created:

cd boinc
./boinc_3.18_blahblah &> logfile.log &
exit

It doesn't care about where the executable is, it only cares about your current working directory.

Rob

Colin
Send message
Joined: 3 Apr 99
Posts: 9
Credit: 40,998
RAC: 0
United States
Message 1173 - Posted: 24 Jun 2004, 14:18:29 UTC - in response to Message 1038.

Ah, I see. Perhaps one could also get it to put files in a specific separate directory by doing, say:

cd boinc/boincfiles
../boinc_3.18

Profile emdub
Send message
Joined: 7 Jun 99
Posts: 2
Credit: 401,580
RAC: 0
Portugal
Message 1260 - Posted: 24 Jun 2004, 16:54:17 UTC

I've been struggling like hell with this Command line version, but I'd also like to understand how to do this... can somebody explain in simple terms? as if for their grandma... unless she does *nix too... ;-) please?

Denis Hart
Send message
Joined: 8 Dec 00
Posts: 6
Credit: 12,983
RAC: 0
Canada
Message 9878 - Posted: 19 Jul 2004, 17:14:47 UTC

Here's how I solved this problem.

I created a folder in the Applications folder called BOINC.
I moved all the BOINC files from my Home folder, and the BOINC application to this folder.
Using TextEdit, I created a script file containing the following:

cd /Applications/BOINC/
/Applications/BOINC/BOINC

I converted it to plain text with the "Make Plain Text" command from the Format menu, and saved it as "Launch BOINC" without an extension, in my BOINC folder.

I used the Finder's "Get Info" command to change the "Open with" property of Launch BOINC to "Terminal". You will have to switch the Enable filter at the top of the selection window to "All Applications" first, or else the Finder will grey out Terminal. Now you can launch the Launch BOINC script by double-clicking it.

Profile Mad Moggies
Avatar
Send message
Joined: 27 Mar 04
Posts: 92
Credit: 14,408
RAC: 0
United Kingdom
Message 10058 - Posted: 19 Jul 2004, 22:46:13 UTC - in response to Message 9878.
Last modified: 19 Jul 2004, 22:48:25 UTC

> Here's how I solved this problem.
>
> I created a folder in the Applications folder called BOINC.
> I moved all the BOINC files from my Home folder, and the BOINC application to
> this folder.
> Using TextEdit, I created a script file containing the following:
>
> cd /Applications/BOINC/
> /Applications/BOINC/BOINC
>
> I converted it to plain text with the "Make Plain Text" command from the
> Format menu, and saved it as "Launch BOINC" without an extension, in my BOINC
> folder.

Was this all that had to go into the script file or is there any other coding needed, please? Is there any reason you created it in Text Edit rather than AppleScript?

I'm asking this as I'm new to all this technical stuff, which we didn't had to know to run the earlier version of SETI@home.

(BTW I already twigged the Get Info method of forcing Terminal to open the program.)

Anonymous Prime
Send message
Joined: 17 Dec 02
Posts: 3
Credit: 111,682
RAC: 81
United States
Message 10314 - Posted: 20 Jul 2004, 13:41:22 UTC - in response to Message 9878.

> Using TextEdit, I created a script file containing the following:
>
> cd /Applications/BOINC/
> /Applications/BOINC/BOINC
>

I've done all that, but Terminal won't run the script. Double-clicking the file will launch Terminal, but nothing else happens after that. Is there something I'm missing, such as a file extension or permission or something?

Profile Nick Chapman
Send message
Joined: 16 May 99
Posts: 18
Credit: 21,927
RAC: 0
United States
Message 23109 - Posted: 7 Sep 2004, 1:48:53 UTC - in response to Message 10314.

> > Using TextEdit, I created a script file containing the following:
> >
> > cd /Applications/BOINC/
> > /Applications/BOINC/BOINC
> >
>
> I've done all that, but Terminal won't run the script. Double-clicking the
> file will launch Terminal, but nothing else happens after that. Is there
> something I'm missing, such as a file extension or permission or something?
>

You need to make it executable, I think.
In terminal, change directory to the location of this text file, then type

chmod +x [filename]

That should do it, I think

Anonymous Prime
Send message
Joined: 17 Dec 02
Posts: 3
Credit: 111,682
RAC: 81
United States
Message 23139 - Posted: 7 Sep 2004, 4:48:39 UTC - in response to Message 23109.

> You need to make it executable, I think.
> In terminal, change directory to the location of this text file, then type
>
> chmod +x [filename]
>
> That should do it, I think
>

Ah, got it. I had been launching BOINC with Applescript, like this:
******************************
tell application "Terminal"
activate
do script "cd /Applications/BOINC/; /Applications/BOINC/BOINC" in window 1
end tell
******************************

Same difference, I guess.



Profile toffuuu
Volunteer tester
Send message
Joined: 30 Mar 00
Posts: 87
Credit: 1,398,700
RAC: 534
United States
Message 63888 - Posted: 13 Jan 2005, 8:18:57 UTC - in response to Message 1038.

Hey Guys! Im wondering however if theres a way to make an applescript for grep, like this is how I do it in the terminal manually cd boinc/slots/0
then im in that folder, then I type grep prog state.sah and i get the following result as an example
grep prog state.sah
0.86543169 any imput on making this an applescript would be greatly apprciated.. Thanks Matt
____________

Questions and Answers : Macintosh : Containing files?

Copyright © 2014 University of California