missing destination file operand after .....

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

missing destination file operand after .....

Postby Xye on Fri Nov 20, 2009 8:17 am

Hey.

I'm trying to get a program working.

I have managed to get it installed following a guide someone els had put online but following the readme document enclosed with it. This is obviously supposed to be for someone who actually knows linux..... Which is not me! lol

The instructions:

* Getting Started
Create a project directory within the $HOME/OpenFOAM directory named
<USER>-1.6 (e.g. 'chris-1.6' for user chris and OpenFOAM version 1.6)
and create a directory named 'run' within it, e.g. by typing:

+ mkdir -p $FOAM_RUN/run

Copy the 'tutorial' examples directory in the OpenFOAM distribution to the
'run' directory. If the OpenFOAM environment variables are set correctly,
then the following command will be correct:

+ cp -r $WM_PROJECT_DIR/tutorials $FOAM_RUN
*****************************************************************
Right of this i have managed to create a file named tom-1.6.x

when I type the mkdir into the terminal nothing actually happens so far as i can see. (Is it supposed to???)

So i assumed i had that right seen as nothing erroneous came up and typed in the cp command.

This did throw up the error:

cp: missing destination file operand after '/tutorials'

I have no idea what is wrong.

Can anyone help?
Xye
Level 1
Level 1
 
Posts: 12
Joined: Thu Nov 19, 2009 10:00 am

Linux Mint is funded by ads and donations.
 

Re: missing destination file operand after .....

Postby DruKe on Fri Nov 20, 2009 9:12 am

Sure thing! First off, welcome! Hope your enjoying Linux.

The first thing to understand is a global variable to help solve your problem. The global variable is much like the PATH setting in Windows. Open up a terminal, type this:
$HOME

It should display something like this:
Code: Select all
bash: /home/Xye: is a directory


Now we'll see if the installation added those global variables or not. At the command prompt, type this:
$FOAM_RUN


If the installation set the global variable $FOAM_RUN, it should display a path.
Do the same for $WM_PROJECT_DIR

If either do not list a directory, your commands will not work.

Please post your results and we'll get you on track!
If your problem has been solved, PLEASE add [SOLVED] to your subject line! It helps everyone!
DruKe
Level 3
Level 3
 
Posts: 103
Joined: Mon Sep 28, 2009 6:54 pm
Location: Sheboygan, WI

Re: missing destination file operand after .....

Postby DrHu on Fri Nov 20, 2009 9:30 am

Xye wrote:when I type the mkdir into the terminal nothing actually happens so far as i can see. (Is it supposed to???)
Yes, it would simply give a new line prompt indicating the command was accepted with no errors
    --you can do an ls -l to see if the directory exists (was created), or use nautilus (Gnome, Mint file manager), you will see the results right away..

OpenFOAM..
http://www.opencfd.co.uk/openfoam/linux.html#linux
http://www.opencfd.co.uk/openfoam/doc/README.html
    Installation
    After unpacking, the user should consult the README file for installation instructions (available in the release at $HOME/OpenFOAM/OpenFOAM-1.6/README).
    --that site's instruction guide including bashrc for installation edits needed..
https://help.ubuntu.com/community/OpenFOAM
    First lets create the directories (folders) the application wants

In Mint 7, mint menu>Terminal
--opens a terminal in your /home directory; you can see that by entering (typing) pwd followed by hitting the enter key to end the command line, which will print (display) your directory location

In terminal, check
  • mkdir OpenFOAM
  • mkdir OpenFOAM/USER
  • cd OpenFOAM/USER
  • mkdir -p FOAM_RUN/run
    That gets the directory setup that the application needs according to your description,..
If you find the gui (nautilus) file manager easier, you can use that to create those directories (folders)
    mint menu>Home Folder>right-click an empty area in the window of that display, Create Folder>OpenFOAM
Last edited by DrHu on Fri Nov 20, 2009 9:54 am, edited 8 times in total.
User avatar
DrHu
Level 17
Level 17
 
Posts: 7022
Joined: Wed Jun 17, 2009 8:20 pm

Re: missing destination file operand after .....

Postby Xye on Fri Nov 20, 2009 9:58 am

DruKe wrote:Sure thing! First off, welcome! Hope your enjoying Linux.

The first thing to understand is a global variable to help solve your problem. The global variable is much like the PATH setting in Windows. Open up a terminal, type this:
$HOME

It should display something like this:
Code: Select all
bash: /home/Xye: is a directory


Now we'll see if the installation added those global variables or not. At the command prompt, type this:
$FOAM_RUN


If the installation set the global variable $FOAM_RUN, it should display a path.
Do the same for $WM_PROJECT_DIR

If either do not list a directory, your commands will not work.

Please post your results and we'll get you on track!


Excellent Someone i understand! lol

Right. When I enter $HOME it does indeed give me the
bash: /home/tom: is a directory


But neither $FOAM_RUN or $WM_PROJECT_DIR produce that same result.
Xye
Level 1
Level 1
 
Posts: 12
Joined: Thu Nov 19, 2009 10:00 am

Re: missing destination file operand after .....

Postby Xye on Fri Nov 20, 2009 10:09 am

ikey wrote:Definitely sounds like the installation didn't do that.
Come to think of it... did you install it via Synaptic/apt? Or was it an archive? (.tar.gz, tar.bz2 etc.)
If that's the case these variables wouldn't be set.
Also you'll find the README referred to the locations as $WM_PROJECT_DIR, in the hope
that you would replace the variables for the actual locations.
This is a common methodology in Linux, maybe this could be the case for you?

- Ikey Doherty


I installed using this ( http://hvirvel.com/installOF ) Guide i found on the OpenFOAM forum

How do i 'replace' these variables? and with what do i replace them?
Xye
Level 1
Level 1
 
Posts: 12
Joined: Thu Nov 19, 2009 10:00 am

Re: missing destination file operand after .....

Postby Xye on Fri Nov 20, 2009 10:16 am

ikey wrote:I just read the installer
Code: Select all
echo . ~/OpenFOAM/OpenFOAM-1.6.x/etc/bashrc >> ~/.bashrc

So it technically has copied those variables to your .bashrc already
Can you return me the output of the following commands please?
Code: Select all
cat ~./bashrc
sudo cat /root/.bashrc

Thanks, I have a slight feeling that it set root users .bashrc and not yours

- Ikey Dohery

P.S Edited, coz i done it wrong


I like your Sig IKey!

Erm back on topic:

both commands gave the output No such file or directory
Xye
Level 1
Level 1
 
Posts: 12
Joined: Thu Nov 19, 2009 10:00 am

Re: missing destination file operand after .....

Postby DruKe on Fri Nov 20, 2009 10:21 am

I have the files downloading right now. It seems like a pretty conveluded install.
Hang tight I'll get back with proper instructions.
:mrgreen:

Take it back I need to run somewhere. I'll check back later. Sorry! :shock:
Last edited by DruKe on Fri Nov 20, 2009 10:29 am, edited 1 time in total.
If your problem has been solved, PLEASE add [SOLVED] to your subject line! It helps everyone!
DruKe
Level 3
Level 3
 
Posts: 103
Joined: Mon Sep 28, 2009 6:54 pm
Location: Sheboygan, WI

Re: missing destination file operand after .....

Postby Xye on Fri Nov 20, 2009 10:24 am

DruKe wrote:I have the files downloading right now. It seems like a pretty conveluded install.
Hang tight I'll get back with proper instructions.
:mrgreen:


Its all good I finished going through those instructions yesterday.
Xye
Level 1
Level 1
 
Posts: 12
Joined: Thu Nov 19, 2009 10:00 am

Re: missing destination file operand after .....

Postby Xye on Fri Nov 20, 2009 10:27 am

ikey wrote:Wow. Weird.
Ok in your file browser go to the OpenFOAM directory (should be in your home directory)
Go into the subfolder "etc" and look for a file named "bashrc"
If that exists (*prays*) then go to File → Save As then input ".bashrc"
Make sure its in your home directory
If this doesn't work out then I'm gonna have to try doing it meself to see what other wondrous cock-ups
this package has in store :lol:

- Ikey Doherty


lol well yes there is a bashrc file in that folder. Ok i successfully saved it to the Home folder
Xye
Level 1
Level 1
 
Posts: 12
Joined: Thu Nov 19, 2009 10:00 am

Re: missing destination file operand after .....

Postby Xye on Fri Nov 20, 2009 10:36 am

ikey wrote:Sweet :D
Technically your original commands should work, with the variables n things.
Was so long ago I have forgotten..... :o
Lol kiddin. Give it a go see will she behave this time

- Ikey Doherty
P.S I like my sig too xD


lol.

Behaving exactly the same I'm afraid.

Input:
cp -r $WM_PROJECT_DIR/tutorials $FOAM_RUN

Output:
cp: missing destination file operand after '/tutorials'
Try 'cp --help' for more information
Xye
Level 1
Level 1
 
Posts: 12
Joined: Thu Nov 19, 2009 10:00 am

Re: missing destination file operand after .....

Postby lagagnon on Fri Nov 20, 2009 10:40 am

That means $FOAM_RUN means nothing to the system and is undefined. You have never defined that global variable in your system or set it properly.
I would ask why you are using variables to define directories? Makes no sense to me.
User avatar
lagagnon
Level 7
Level 7
 
Posts: 1888
Joined: Wed Jun 17, 2009 7:38 pm
Location: an island in the Pacific...

Re: missing destination file operand after .....

Postby Xye on Fri Nov 20, 2009 10:44 am

Your cat ~/.bashrc command now gives:
+ . $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
Xye
Level 1
Level 1
 
Posts: 12
Joined: Thu Nov 19, 2009 10:00 am

Re: missing destination file operand after .....

Postby Xye on Fri Nov 20, 2009 10:56 am

Ok well that command seemed to work! well it thought about it for a couple of seconds then moved to the next line....
Xye
Level 1
Level 1
 
Posts: 12
Joined: Thu Nov 19, 2009 10:00 am

Re: missing destination file operand after .....

Postby Xye on Fri Nov 20, 2009 11:03 am

ikey wrote:
Xye wrote:Ok well that command seemed to work! well it thought about it for a couple of seconds then moved to the next line....

That just means there was quite a few files involved, hence the delay :)
Hope that solves it for you?

- Ikey Doherty


Sorry my old friend is back
cp: missing destination file operand after '/tutorials'


I think it might be the fact that this command is now wrong (????)
cp -r $WM_PROJECT_DIR/tutorials $FOAM_RUN


I don't know where the $WM_PROJECT_DIR comes from...
Xye
Level 1
Level 1
 
Posts: 12
Joined: Thu Nov 19, 2009 10:00 am

Re: missing destination file operand after .....

Postby Xye on Fri Nov 20, 2009 11:10 am

ikey wrote:$FOAMRUN = ~/OpenFOAM/tom-1.6/run
from what i can figure..


Erm. Is that good?

Sorry I'm not so good at this lol
Xye
Level 1
Level 1
 
Posts: 12
Joined: Thu Nov 19, 2009 10:00 am

Re: missing destination file operand after .....

Postby Xye on Fri Nov 20, 2009 11:49 am

ikey wrote:
Code: Select all
cp -r ~/OpenFOAM/OpenFOAM-1.6.x/tutorials ~/OpenFOAM/tom-1.6.x/run

That's about as much as I can make out from your instructions


*Sigh* i would have thought they would make it at least fairly easy.

I have manually copied over the tutorials folder to where the file it is supposed to be in (as far as i can work out from the commands) yet it still refuses to find it.

I've burned up 2 days on trying to get this to work. Not sure if its me of the program thats being difficult.

Do i stick it out with this one? Or try to find another CFD Package?

I would question if it is Mint that is being awkward lol. Although thats probably not such a good idea seen as its their forum.

But you guys have been great trying to help me.
Xye
Level 1
Level 1
 
Posts: 12
Joined: Thu Nov 19, 2009 10:00 am

Re: missing destination file operand after .....

Postby DruKe on Mon Nov 23, 2009 5:42 pm

Shame.. the developers really *should* package that software a lot better.
:?
If your problem has been solved, PLEASE add [SOLVED] to your subject line! It helps everyone!
DruKe
Level 3
Level 3
 
Posts: 103
Joined: Mon Sep 28, 2009 6:54 pm
Location: Sheboygan, WI

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot] and 28 guests