Skip to content

Tag: linux

How to select the output device of audio in ubuntu manually?

In Ubuntu, we can select the output device of audio in sound preferences. But now I want to write a shell script, so I need to select the output device from the commandline. Answer You can first view your current default audio device by typing: And with you can view all your devices. And with this command you…

Tailing a file from where I left off before?

Suppose I have a file. I tail its last 10 lines and got some data. And the next time I come to tail, its length increases by 4. So I need to tail only that many lines to get data. Is there a simple command line for this? Like a mix of tail, wc, and grep? Answer If you save

linux library problem

Everybody out there, I’m writing a c code which have a strange problem when I compile it . The source code is OK. I compile it with following option: But it show the out put like that: I searched for libjvm.so i found It in my system in /usr/java/lib. I made a symbolic link of it but did not work.

Problem in Timers and signal

I have implemented a POSIX timer using timer_create( ) API, and this will generate SIGUSR1 when the timer expires for which i have put a handler code. Now the problem is, if this program receives another SIGUSR1, then the same signal handler will be invoked and caught. Is there any way to prevent this, so tha…