Views:

Question
How can I process files in a Linux environment?

Answer
Some of our MIKE models are capable of running in a Linux environment.

Pre- and postprocessing of the files are carried out in Windows so the following commands (from Windows) can be used for transferring files between the two environments:

scp -r {path\dir} {user}@{IP address}:{path}   
   Copy files from Windows PC to Linux PC using PowerShell
scp -r {user}@{IP address}:{path} {path\dir}    
   Copy files from Linux PC to Windows PC using PowerShell

 

 


 

The table below contains a list of Linux commands that are frequently used for scripting and managing files. 

tar zxvf {file}.tgz
Unpack compressed files (from gzip)
tar czvf {file}.tgz  {files or directory}   
Compress files or directories to tgz file
ls
ls -lah
List files in a directory
cd {dir}
cd ..
Change directory
mv {file} {path/dir}
Move, and rename, files
rm {file}
rm *
Delete files
nano {file}
View a log or text file in an editor
nano
Write a new ShellScript (*.sh)
chmod u+x {file}
Make a ShellScript executable (*.sh) by the current user
./
Run an executable ShellScript
sed -i -e 's/\r$//' {file}
Troubleshoot and fix ShellScripts created on Windows (*.sh)
history
List the history of recent commands

 

 


 

 

 

 

 

 

 

 

 

 

Commands concerning installation and licensing of MIKE Software can be found in e.g. MIKE Zero for Linux Installation Guide or MIKE+ for Linux Installation Guide.


 

 

Related Products: MIKE 21/3, MIKE+