Linux OpenFOAM issue

1,723
51
Hi PF!

I'm unsure if I'm in the right area, but I'm trying to run OpenFOAM on Linux. I'm following the tutorial here:


but when I type the 4th command: cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily
I receive the error: cp: missing destination file operand after '/opt/openfoam6/tutorials/incompressible.simpleFoam/pitzDaily'

Any help is very appreciated!
 

Svein

Science Advisor
Insights Author
1,938
593
but when I type the 4th command: cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily
I receive the error: cp: missing destination file operand after '/opt/openfoam6/tutorials/incompressible.simpleFoam/pitzDaily'
Yes - you tell the system to copy a file from (the source you have given) to [nothing]. No wonder the copy function is confused!
 

jim mcnamara

Mentor
3,525
1,736
Linux/UNIX cp syntax:
Code:
cp [option]  [path/]source destination
two arguments are required.
 
555
85
Notice that there is a dot after the cp command on the website you mentioned, which means 'here, at this location'. You are copying the directory 'pitzDaily' into the location where you currently are, which is the directory $FOAM_RUN, or actually the directory to which this alias refers to.
 

jim mcnamara

Mentor
3,525
1,736
The pwd command shows what directory the "Dot" represents, if there is any confusion.
e.g.,
Code:
$> pwd
/home/jim
$>  echo .
.
$>
Using echo will not work for this.
 

Want to reply to this thread?

"Linux OpenFOAM issue" You must log in or register to reply here.

Related Threads for: Linux OpenFOAM issue

Replies
8
Views
575
  • Posted
Replies
3
Views
858
  • Posted
Replies
2
Views
445
  • Posted
Replies
5
Views
18K
  • Posted
2
Replies
38
Views
2K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top