bash base
First of all, some simple tutorial that you can read: Bash for beginners Bash for beginners2
A list of useful commands that I use a lot of times:
- Use Tab to autocomplete the command or show a list of alternatives
ls -ltrh
list last modified files at the bottomcd some_other_directory
change directoryvim some_file_to_edit
my favourite editor (vim tutorial). Of course, you can choose an other favourite editor on the terminal!cp somefile destination
copy somefile to destinationrm some_file
remove some_filerm -r some_directory
remove some_directorymv something new_name
move something to new_name- Ctrl + C kill current running program
cat some_file
dump some_file on the terminalpwd
print current directory nametail -f some_file
show last few line of some_file, wait for new lines that are written by some other program to some_file (for example a simulation) and print them.tar xf filename.tar.whatever
extracts the content of the archive in the current directory (it understand automagically the type of archive)tar cvjf newarchive.tar.bz2.willbeoverwritten folder1 file1 file2 ...
compress the file/folder list in the new archive- Ctrl + R + some text to search a command in the commands history