3.0 Linux Commands
3.1 Requirements
Access to the HPC or a Linux computer
3.2 Common commands
Change password:
passwdMake directory:
mkdirChange directory:
cdRemove file:
rmRemove directory:
rmdirCheck logged-in users:
whoorwMonitor system:
top(press1for per-CPU view,qto quit)Getting help on various UNIX commands:
man cdor simplymanSearch for text in files:
grep 'search_term' filenameProcess and analyze text files:
awk '{print $1}' filenameCount lines, words, and characters in a file:
wc filenameDisplay the first few lines of a file:
head filenameDisplay the last few lines of a file:
tail filenameRedirect output to a file:
command > output.txtAppend output to a file:
command >> output.txtView running processes:
ps auxKill a process:
kill process_id