Posts

notes for Linux

Uptime: show the machine’s latest boot up time and running time. Can use to track when it restarted difference between && and ; when executing shell commands: using ; when the first command fails, the second command will still be executed using && when the first command fails, the second command will not be executed Change user accessibility of a file or directory: sudo chmod 777  /home/pi/schedule/sampleFile When cannot press tab to auto-fill filenames: Possible reason 1: root disk full, df –h will show this Possible reason 2: lost writing access to /tmp. Check  /tmp access permissions, which should like this: ls - l / | grep tmp drwxrwxrwt   7 root root  4096 Nov   7 17 : 17 tmp if current user does not have write access, then sudo chmod a + rwxt / tmp get system and hardware specs : for command line solutions, you can use the command lshw. Install it if needed: sudo apt-get insta...

most commonly used Emacs commands

M-w copy C-w cut C-y paste C-x 3 two windows C-x o move cursor C-x <- ->change to info, etc C-x C-s save C-x C-c exit C-x C-z go to background shell. Then use command “ fg ” to go back to emacs C-x [ page front  C-x ] page end C-a go to line start C-e go to line end C-k cut a line C-x C-f open file C-x k close buffer M-x linum-mode show line number For the emacs config file that I'm using ( ~/.emacs ):   F2 go to shell within emacs, shortcut for M-x shell F5 refresh page F6 list all emacs opened files some more useful commands: highlighting: The following will highlight until you close the file. emacs highlight commands key command 【 Alt + s   h   . 】 highlight-symbol-at-point 【 Alt + s   h   f 】 hi-lock-find-patterns 【 Alt + s   h   l 】 highlight-lines-matching-regexp 【 Alt + s   h ...