Μετάβαση στο περιεχόμενο

Commands cheat sheet

List items and change directories

command description
ls list directory contents
ls -l list all files and directories
cd dir Change the current directory to dir
cd .. go up one directory
cd go to home directory
pwd print name of current working directory
df -h ~ show available storage space in home directory

Create, Copy and Delete items

command description
mkdir dir make a directory
rm file delete a file
rmdir dir delete an empty directory
rm -r dir delete a directory with its contents
cp file1 file2 copy file1 to file2
cp -r dir1 dir2 copy dir1 to dir2
mv item1 item2 move (rename) files or directories

Manage permissions

command description
chmod MODE item change permissions on item
chmod -R MODE dir change permissions on directory with contents
chown user0 item change owner of item
chown user0: item change owner of item; change group ownership to authusers
chown -R user0 dir change owner of directory with contents
chgrp group0 item change group ownership of item
chgrp -R group0 dir change group ownership of directory with contents

Access files

command description
cat <file> display the contents of a file on the screen
less <file> view file with page navigation (use q to exit and arrows to navigate)
head <file> output the first 10 lines of a file
tail <file> output the last 10 lines of a file

Για την επεξεργασία ενός αρχείου, χρησιμοποιούμε έναν από τους παρακάτω text editors:

command description
grep <pattern> <file> search for a pattern in a file
grep -i <pattern> <file> search pattern ignoring upper/lower case
grep -v <pattern> <file> display non-matching lines
find <file> find a file in current directory
find . -name "<file>" find instances of a file in current directory hierarchy

Compression

command description
gzip <file> compress a file
gunzip <file.gz> decompress a Gzip file
unzip <file.zip> decompress a Zip file
tar cvzf <file.tar.gz> <files> create a tar with Gzip compression
tar xvzf <file.tar.gz> extract a tar using Gzip

Man page and help

command description
man <command> display the manual page of the command
<command> --help display usage information and options

Batch jobs - Slurm

command description
sbatch submit.sh submit a job to the cluster
squeue check the status of submitted jobs
scancel jobid cancel a submitted job
seff jobid show resources of a finished job

Shortcuts

command description
Ctrl+C cancel the current command
Ctrl+W delete a word in the current line
Ctrl+U delete the current line
Ctrl+R search command history
Ctrl+D log out of current session

Βοήθεια / Υποστήριξη

Μπορείτε να επικοινωνήσετε με το support helpdesk μέσω του email hpc-support@auth.gr, για περαιτέρω βοήθεια και υποστήριξη.