-
Notifications
You must be signed in to change notification settings - Fork 3
Useful Unix commands
Below you will find a list of some of the most frequently used commands when using LSNM in a Unix/Linux workstation. Please note that they are not meant to be exhaustive and that some of them apply only if you are located within the NIH computer network.
How to tar and zip a directory prior to copying or transferring:
$ tar -cvzf file_name.tar.gz directory_name
How to unpack and unzip a tar.gz file:
$ tar -xzvf file_name.tar.gz
How to download a file from Helix:
$ scp [email protected]:/home/username/myfile .
How to upload a local file to Helix:
$ scp mylocalfile [email protected]:/home/username
To run Matlab remotely, you need to tunnel the X-windows connection through the SSH connection as follows:
$ ssh -X [email protected]
After pressing <Enter>, you will have to provide your Helix password, after which the Matlab window will be displayed on your local terminal.
How to execute same command on a number of files using a unix (bash) script loop. Let's say we want to execute the command 'netgen' on all files in current directory with extension 'ws':
$ for file in *.ws; do
$ netgen $file
$ done
About
Getting Started
Essentials
- Basic commands
- Setting up a network
- Simulating a multi-trial, multi-subject visual experiment
- Simulating a multi-trial, multi-subject auditory experiment
- Simulating neuroimaging data
- Frequently Asked Questions
Tutorials
Extras