- dsg_admin
- Comments Off on Using grep to search a file using multiple words as boolean AND OR condition
If you are a coder like me we tend to discover after we have made a script that we need to change something on multiple lines. Recently I have a script whereby added a “log_message” function which would echo a phrase. However, I wanted to append a double parenthesis after the last character in the
Read MoreThere are times when you may unintentionally delete a file which is being written to. When this occurs it will leave an Open Filehandle. In Linux open filehandles may be viewed via the ‘lsof’ command. # lsof +L1 In the following example here was the situation. $ lsof +L1 COMMAND PID USER FD TYPE DEVICE
Read MoreI recently encountered yet another MAC Madness issue! I changed out my wired MacBook extended keyboard for a used Apple ‘Magic’ Keyboard. Well the ‘magic’ was that it introduced an unwanted ‘feature’ whereby when I switch between external monitors, and the webpage in view is scrolled downward, the page would automagically jump to the top
Read MorePart of my ‘day job’ is trolling thru source code when looking for answers. My preferred mechanism, other than a recursive grep, is to use cscope Cscope is a useful tool for searching a source code tree after you build a list of files to search The Problem However, in this conundrum, when I would
Read MoreFor my fellow Insomniacs out thereā¦ If you are up scrolling your phone for things around the Google-verse to read to shut off your brain so you can possibly go to sleep.. I came across this article on LWN which provides a trough of information regarding Linux Memory Management. The original document prints out at
Read MoreThere are times you may need to quickly confirm the grub boot parameters that were issued either at the console (or by default) This information is logged to /var/log/messages when you grep with keywords “Kernel command”
Read MoreEncountered a fun riddle recently whereby on a Fedora 34 system I needed to locate all ethernet interfaces on a system that are obtaining a DHCP address, then after the first reboot create a static IP address. I am a big fan of looking thru the Linux pseudo filesystem in /sys In this instance I
Read MoreTo modify the gnome desktop dock (i.e. launcher or launchpad) from the command line an easy way is to perform the following: This above will add Firefox, The File Manager, Terminal, Terminator and Gnome Settings to the desktop
Read More