As the title says! I can read info from the device with “dmesg” and see it when “lsusb” but how do I attach/install it as for example dev/ttyUSB2 Answer One way is to change the VID and PID with FTDI software FT Prog (utility for programming the EEPROM of FTxxx devices). Change to 0403…
How can I set rpath on gcc binaries during bootstrap?
I am trying to build gcc 4.7.2 using a custom prefix $PREFIX I have built and installed all the prerequisites into my prefix location, and then successfully configured, built and installed gcc. The problem that I now have is that $PREFIX is not in the library search path, and therefore the shared libraries ca…
Get the MySQL path
I tried googling to get the MySql path, but it was unsuccessful. Is there a unix command, where I can find the MySQL database directory path? Answer Try this query, SHOW VARIABLES LIKE ‘datadir’;
Is there a way to write to a Google docs spreadsheet from the Linux shell?
I have a cron job that exports some data to CSV every day. Is it possible to write this data directly to a Google doc (spreadsheet) from the Linux shell (Ubuntu)? Answer For that you have the Google Documents List API Example code at Write to a Google Spreadsheet from a Python script
What could cause “bad file descriptor” in multithreaded environment?
This question is somehow similar to Bad file descriptor but it’s not the same at all. I know this is “bad question” (“too localized” maybe), but I can’t figure it out and I’m now out of any ideas. Introduction I have a manager thread, that starts 75 other threads. Eac…
Bash while read loop extremely slow compared to cat, why?
A simple test script here: When I do cat my450klinefile.txt | myscript the CPU locks up at 100% and it can process about 1000 lines a second. About 5 minutes to process what cat my450klinefile.txt >/dev/null does in half a second. Is there a more efficient way to do essentially this. I just need to read a …
Deleting Linked List Elements
I’m curious what I have done wrong, since my void *DeleteDoneNodes(node * n) doesn’t do anything, no error but no output neighter, so could anyone help me finding the root of my problem thank you. Scenario: cmd line ./s m n m number of nodes in list, n number of workingThreads should delete each n…
Use wc on all subdirectories to count the sum of lines
How can I count all lines of all files in all subdirectories with wc? man wc suggests wc -l –files0-from=-, but I do not know how to generate the list of all files as NUL-terminated names did not work. Answer You probably want this: If you only want the total number of lines, you could use
python-dev installation error: ImportError: No module named apt_pkg
I am Debian user, and I want to install python-dev, but when I run the code in the shell as a root: I get the following error: What seems to be the problem and how can I resolve it? Answer Make sure you have a working python-apt package. You could try and remove and install that package again to fix
Bash script error. Syntax error near unexpected token
I’m trying to work through a script to email me a notification if the load is too high on our server. I found a good one but it’s giving me and error when I run it, and I can’t see why. Running the code below gives the error: line 13: syntax error near unexpected token `fi’ I thought I…