Bath HPC
Balena
- Getting Access
- Getting Started
- System Architecture
- Developer Guides
- Premium Accounts
- MPI Guide
- Training
- Scheduler
- Storage
- Software
- Environment Modules
- Getting Help
Command | Description |
---|---|
ls | directory listing |
ls -la | formatted with hidden files |
mkdir dir | create a directory dir |
cd dir | change directory into dir |
cd | change to your home directory |
pwd | show current directory |
rm file | remove the file named file |
rm -r dir | remove directory dir |
cp file1 file2 | copy file1 to file2 |
cp -r dir1 dir2 | copy dir1 to dir2 ; create dir2 if it doesn't exist |
mv file1 file2 | rename or move file1 to file2 - if file2 is an existing directory, moves file1 into directory file2 |
ln -s file link | create symbolic link link to file |
touch file | create file |
more file | output the contents of file |
head file | output the first 10 lines of file |
tail file | output the last 10 lines of file |
tail -f file | output the contents of file as it grows, starting with the last 10 lines |
Command | Description |
---|---|
ssh user@hostname | connect to hostname as user |
ssh -X user@hostname | connect to hostname as user and enable X11 (Display) forwarding |
Command | Description |
---|---|
ps | display your currently active processes |
top | display all running processes |
kill pid | kill process id pid |
killall proc | kill all processes named proc* |
bg | lists stopped or background jobs; resume a stopped job in the background |
fg | brings the most recent job to the foreground |
fg n | brings job n to foreground |
Command | Description |
---|---|
ping hostname | ping hostname and show results - use to check if your system can communicate with hostname |
dig domain | get DNS information for domain |
wget http://foo.com/bar/file.tar.gz | Download file.tar.gz |
Command | Description |
---|---|
date | show the current date and time |
cal | show this months calender |
uptime | tell how long the system has been running |
w | show who is logged on to the system |
whoami | who you are logged in as |
finger user | display information about user |
uname -a | show kernel information |
cat /proc/cpuinfo | show CPU information |
cat /proc/meminfo | show memory information |
man command | show manual for command |
df -h | show disk usage |
du -h file | show disk usage by file |
free | show memory and swap usage |
whereis app | show possible locations of app |
which app | show which app will be run by default |
Command | Description |
---|---|
Ctrl+C | halts the current command |
Ctrl+Z | stops the current command - resume in the background with bg and in the foreground with fg |
Ctrl+D | exits the current sessioin; similar to exit |
Ctrl+W | erase one word on the current line |
Ctrl+U | erase the whole line |
Ctrl+R | type to bring up a recent command |
!! | execute the last command |
exit | exit the current session |
Command | Description |
---|---|
grep pattern files | search for pattern in files |
grep -r pattern dir | search recursively for pattern in dir |
command | grep pattern | search for pattern in the output of command |
locate file | locate all instances of file |
find . -name "pattern" | find filename which matches pattern in the current directory indicated by the . (dot) |