Linux Tech Tips
This is a list of useful facts about Linux that I've discovered by either reading the man pages or browsing the Internet.
- With atexit it is possible to call a function when the process terminates.
- You can list background processes in your current shell with jobs.
- You can place a process into the foreground with fg.
- /proc/ directory can turn out to be useful; especially if you are interested in process file descriptors.
- In order to find a process ID (a PID) of a running program, use pidof.
- You can determine file type of an file with the file command.
- There is a more sophisticated version of the top command, it is called htop.
- Have no clue where a file is? Using find gives no results? Try locate, it searches the whole system!
- You can programmatically send desktop notifications with a notify server.
- If you don not have you computer running 24/7, to schedule a job use anacron.
- You can attach to a process in order to see what system calls it makes with strace.
- With w you can see which users are logged in and what they are doing
- With watch you can execute a program perodicly and see its output
- Need a dead simple templating mechanism? Try envstub