I have an ubuntu machine with default shell set to bash and both ways to the binary in $PATH: But when I try to call a script that uses the inline file descriptor (that only bash can handle, but not sh) both calls behave differently: The example-script I am referring to looks like that the real one is a littl…
Tag: linux
How to move all files including hidden files into parent directory via *
Its must be a popular question but I could not find an answer. How to move all files via * including hidden files as well to parent directory like this: This will move all files to parent directory like expected but will not move hidden files. How to do that? Answer You can find a comprehensive set of solutio…
gdb backtrace with no user input?
I’m wondering if it’s possible to launch an application via GDB, on a SegFault write the backtrace to a file (to look at later), and then exit GDB all without any user input. I’m running an application from a shell script in an infinite loop (so if it crashes it reloads) on OS boot from a no…
How to make rsync read SRC from STDIN?
I want to dump my MySQL database and make daily backups with rsync. First approach I came up with is something like mysqldump -ufoo -pbar baz > /var/tmp/baz.sql && rsync /var/tmp/baz.sql /backup/ && rm /var/tmp/baz.sql. Then I started to wonder if it is possible not to use the temporary fil…
How to know the given shared library is built with debug symbols or not?
I have some compiled libraries i.e. shared library (*.so) on x86 Linux and I want to quickly determine whether they were compiled with debugging symbols (i.e with -g/debug option) or not. How to check it? Answer You can use the file command to see if a file is stripped. Basically, this means that the debuggin…
a light solution to convert text to pdf in Linux [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and …
Search for a String inside all files inside a war
Where I work someone had Java project and used Eclipse to export that project into a .war package. Now I need to search for a string inside all the files that make that .war package. I know that a .war package is just a .zip file, and I have extracted its contents, however, now I have bunch of of .class
Minimizing copies when writing large data to a socket
I am writing an application server that processes images (large data). I am trying to minimize copies when sending image data back to clients. The processed images I need to send to clients are in buffers obtained from jemalloc. The ways I have thought of sending the data back to the client is: 1) Simple writ…
Use picocom – sending request
I’m sorry, but I don’t understand how use picocom to send a request/command to the device. Official doc: http://linux.die.net/man/8/picocom I want to be IN the OS I reach, I connect to an Arduino YUN using linux OS inside and I want to be root on it, it’s probably easy, I’m already con…
Linux display currently running processes
What is the command to display currently running processes and the option to display PPID’s? I thought that it might be: jobs -p jobs -pl Neither worked though. Any hints? Answer ps -ef will display all processes and include PPIDs.