Linux OpenFOAM issue

  • #1

member 428835

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:

https://cfd.direct/openfoam/user-guide/v6-tutorials/
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!
 

Answers and Replies

  • #2
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!
 
  • #3
Linux/UNIX cp syntax:
Code:
cp [option]  [path/]source destination
two arguments are required.
 
  • #4
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.
 
  • Like
Likes member 428835 and jim mcnamara
  • #5
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.
 
  • Like
Likes member 428835

Suggested for: Linux OpenFOAM issue

Replies
2
Views
586
Replies
5
Views
198
Replies
5
Views
492
Replies
4
Views
453
Replies
1
Views
587
Replies
9
Views
1K
Back
Top