I’ve tried to execute the code with this command But I got the error: The version is: How can I fix the problem? Answer I see the same behaviour: One workaround is to include the header using this pattern instead: after which:
Tag: ubuntu
Find which program caused a core dump file
I’ve been going through intense program/package installation recently, so I can’t tell for sure which of the newly installed programs (or old programs) caused the appearance of a core file in my home folder. It’s a server, so I better find out any possible sources of instability on the machine. Answer You can simply use the file program to identify
Get file from ubuntu server
I have an Ubuntu server running with DB backups. How to get the backups? I am using a *.pem file to login. I have been trying mail with mailx. I execute the command but without success. I get no error messages I am aware of that this is without attachments. How to get this working? With wget do I need
java application and x11 forwarding
I need to start jperf on virtual server. I configured X11 forwarding via ssh. xclock – is working. But if I start jperf I get: user@client-32:~/sandbox/jperf-2.0.2$ sh jperf.sh Exception in thread “main” java.lang.ExceptionInInitializerError Caused by: java.awt.HeadlessException at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:77) at net.nlanr.jperf.JPerf.(Unknown Source) java version: java version “1.7.0_03” OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3) OpenJDK Client VM (build 22.0-b10, mixed mode, sharing)
How to check if sed has changed a file
I am trying to find a clever way to figure out if the file passed to sed has been altered successfully or not. Basically, I want to know if the file has been changed or not without having to look at the file modification date. The reason why I need this is because I need to do some extra stuff
How to programmatically check for connection?
In Linux (Ubuntu), I want to programmatically check if there is Internet connection (or if eth0 is connected). I’m doing this because I am writing a program that requires network connection on a system that is highly prone to lose connection. So I was thinking maybe a script that I can run periodically to check. Can you give me good
Grep inside all files created within date range
I am on the Ubuntu OS. I want to grep a word (say XYZ) inside all log files which are created within date range 28-may-2012 to 30-may-2012. How do I do that? Answer This is a little different from Banthar’s solution, but it will work with versions of find that don’t support -newermt and it shows how to use the
iconv any encoding to UTF-8
I am trying to point iconv to a directory and all files will be converted UTF-8 regardless of the current encoding I am using this script but you have to specify what encoding you are going FROM. How can I make it autdetect the current encoding? dir_iconv.sh terminal line Answer Maybe you are looking for enca: Enca is an Extremely
how to run file associated application from console linux
on windows exist command: on mac: Are there analogue command under Ubuntu? Answer xdg-open if you have a freedesktop.org-compatible environment.
taking a screen shot of a specific area on the screen once every second
I would like to be able to take screen shots of a specific area on the screen once every second and have the file named MMDDYYYYHH:MM:ss is this possible using the command line and a program. I was thinking of using a script like this But I don’t know the commands to access the program to change the area on