Linux OpenFOAM issue

  • #1
joshmccraney
Gold Member
1,959
102
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
Svein
Science Advisor
Insights Author
2,124
679
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
jim mcnamara
Mentor
4,107
2,607
Linux/UNIX cp syntax:
Code:
cp [option]  [path/]source destination
two arguments are required.
 
  • #4
bigfooted
Gold Member
596
113
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 joshmccraney and jim mcnamara
  • #5
jim mcnamara
Mentor
4,107
2,607
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 joshmccraney

Related Threads on Linux OpenFOAM issue

Replies
8
Views
1K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
2
Views
703
  • Last Post
2
Replies
38
Views
2K
  • Last Post
Replies
5
Views
18K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
3
Views
3K
Replies
1
Views
4K
  • Last Post
Replies
3
Views
6K
  • Last Post
Replies
0
Views
5K
Top