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 -ltrhlist last modified files at the bottom
cd some_other_directorychange directory
vim some_file_to_editmy favourite editor (vim tutorial). Of course, you can choose an other favourite editor on the terminal!
cp somefile destinationcopy somefile to destination
rm some_fileremove some_file
rm -r some_directoryremove some_directory
mv something new_namemove something to new_name
- Ctrl + C kill current running program
cat some_filedump some_file on the terminal
pwdprint current directory name
tail -f some_fileshow 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.whateverextracts 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