CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

About log and | tee log in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 2 Post By wyldckat
  • 2 Post By wyldckat
  • 1 Post By HakikiCanakkaleli

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2013, 08:57
Default About log and | tee log in OpenFOAM
  #1
Senior Member
 
cfdonline2mohsen's Avatar
 
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16
cfdonline2mohsen is on a distinguished road
Hi Foamers
I have a question about log and | tee log in OpenFOAM.
If I interrupt a run in OpenFOAM for example at t=10sec and then continue it some time later; all the data that was previously been written in the log file (here from t=0 to t=10 sec) will be replaced by this new values (t=10 afterward).
So is it possible to use this | tee log in OpenFOAM to write these new data at the end of the previous log file instead of deleting and replacing the old data?
__________________
“If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.”
cfdonline2mohsen is offline   Reply With Quote

Old   September 7, 2013, 09:30
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Mohsen,

Did you try checking the help provided by the tee command?
Code:
tee --help
Or:
Code:
man tee
Best regards,
Bruno
cfdonline2mohsen and vivek05 like this.
__________________
wyldckat is offline   Reply With Quote

Old   September 7, 2013, 10:57
Default
  #3
Senior Member
 
cfdonline2mohsen's Avatar
 
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16
cfdonline2mohsen is on a distinguished road
Thanks Bruno for the quick answer.
yeah it was very simple. I think I should turn off my PC and get some sleep!
Code:
tee log --help
Usage: tee [OPTION]... [FILE]...
Copy standard input to each FILE, and also to standard output.

  -a, --append              append to the given FILEs, do not overwrite
  -i, --ignore-interrupts   ignore interrupt signals
      --help     display this help and exit
      --version  output version information and exit

If a FILE is -, copy again to standard output.

Report tee bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'tee invocation'
and
Code:
 | tee log -a
worked for me.

Thanks
------------------
By the way, How can I exit from the Manual using:
Code:
man tee
and go to the next line in the Terminal without closing it?
__________________
“If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.”
cfdonline2mohsen is offline   Reply With Quote

Old   September 7, 2013, 11:08
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by cfdonline2mohsen View Post
By the way, How can I exit from the Manual using:
Code:
man tee
and go to the next line in the Terminal without closing it?
It should be written at the end of the terminal:
Quote:
Manual page tee(1) line 4/49 (END) (press h for help or q to quit)
For more details about man: http://linuxcommand.org/reading_man_pages.php
__________________
wyldckat is offline   Reply With Quote

Old   September 7, 2013, 11:34
Default
  #5
Senior Member
 
cfdonline2mohsen's Avatar
 
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16
cfdonline2mohsen is on a distinguished road
Thanks Bruno
the linuxcommand website is wonderful!
__________________
“If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.”
cfdonline2mohsen is offline   Reply With Quote

Old   December 14, 2013, 07:39
Default
  #6
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13
HakikiCanakkaleli is on a distinguished road
Considering tee is a command that enables output to be written to both standard output and files, some may want to generate separate log files. In that case, I append the files, one to another:

Code:
cat log* >> log_all
Iose likes this.
HakikiCanakkaleli is offline   Reply With Quote

Old   March 31, 2020, 16:23
Default error of already run remove log file to re-run
  #7
New Member
 
pranay
Join Date: Mar 2020
Posts: 7
Rep Power: 6
pranay347 is on a distinguished road
hi i am running a chtRadiation case, initially i run a Allrun file it created log files in the folder but for 2nd time when i run Allrun file after deleting all log files using Allclean file its giving error as "already run on "path" remove log file to re-run". can anyone help me how to proceed?
pranay347 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory protection in OpenFOAM / combinig with FORTRAN botp OpenFOAM Programming & Development 2 February 15, 2016 12:25
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 05:36
[Gmsh] gmsh 2.6.0 conversion to OpenFoam 160 rosswin OpenFOAM Meshing & Mesh Conversion 0 March 5, 2013 07:34
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 13:50
OpenFOAM Training and Workshop Zagreb 2628Jan2006 hjasak OpenFOAM 1 February 2, 2006 21:07


All times are GMT -4. The time now is 08:59.