What is the equivalent of below to jsp , below i am posting request to the http url , want to write the same using java Answer Try this:
Tag: linux
Rsync not transferring the changes
I am trying to sync this local file (release.txt) to a server (verlis) in which I have ssh into, into the same path directory in which it also contains the same file. And so, I did the following: ssh verlis rsync -av /tools/packageA/release.txt verlis:/tools/packageA/release.txt The process was very fast and …
Build is happening by default with g++ instead of arm compiler?
I am encountering a very strange issue. I am building my source for ARM with ARM compilers. I modified CXX field in makefile to build using arm-linux-gnueabihf-g++ instead of g++ but while building its still taking g++. Can someone please help me here? MY makefile has the following entry I modified it to look…
Which header file do I have to include to get printk() within a kernel source file?
Let’s say I want to use printk() within arch/x86/boot/string.c before compiling the kernel. Which header file do I have to include so that the linker knows where to find printk()? I tried #include <linux/kernel.h> and #include <linux/printk.h> but I always get errors during make bzImage tell…
How to make diffstat count removed and newly added files to LOC count?
this is similar to git diff –stat, but diffstat is ignoring “Only in dir1” and “Only in dir2” files, whereas git diff adds it to deletion and insertion counts respectively. Is there a way to make diffstat to do the same? Answer Simpler: using GNU diff’s -N option, e.g., whe…
compare the length of multiple files using awk or sed
I want to compare the number of lines of each file and choose the one that contains the maximum number of lines for example I will get as result Answer Alternative with lot’s of piping this script assumes the file names are under your control and space or _V won’t appear in the base names. Otherwi…
How to run eval spawn ssh and expect in background?
I created a script to get in inside an Access Point (AP) using ssh and execute some commands and I used expect to interact with shell. The scripts works fine when it is running on foreground, but when I try to execute the same script in background using & to fork the process, it stop at spawn ssh command …
Linking binary compiled with “-g” with library without “-g”
Will there be any issues if a binary compiled with gdb symbols (-g) is linked with a library without gdb symbols? I am debugging this issue, and I am checking if the “-g” might be causing this. Answer Linking libraries compiled with debug symbols and without debug symbols should not cause Segmenta…
Centos shell script – Group files starting with the same string
I have a directory with many pdf files. Each file name starts with a numeric ID (5 chars fixed length), as follows: I’m trying to figure out how to write a shell script in CentOS that reads files in such directory and list them depending on the ID. The shell script should return the following output (on…
gdb core dump can not see any symbols after “sudo apt-get install libc6-dbg”
I am trying to debug a program in Ubuntu 12.04(x86_64) LTS with core dump file. At the beginning, the “bt” command is ok, just like below I want to see the symbol in libc.so.6 , so I install libc6-dbg using but after install I get all the thing wrong , showing in the below: I try to remvoe lib6c-d…