I was attempting to create a swap file: I get “/var/swap No such file or directory” Am I supposed to create the file first? The documentation I found does not say that, so I am concerned. Answer Yes, you’ll need to create the file first. dd is the standard choice: this’d create a 128me…
Is it possible to compile a C/C++ source code that executes in all Linux distributions without recompilation?
Is it possible to compile a C/C++ source code that executes in all Linux distributions without recompilation? If the answer is yes, can I use any external (non-standard C/C++) libraries? I want distribute my binary application instead of distribute of source code. Answer No, you can’t compile an executa…
Is rename() without fsync() safe?
Is it safe to call rename(tmppath, path) without calling fsync(tmppath_fd) first? I want the path to always point to a complete file. I care mainly about Ext4. Is the rename() promised to be safe in all future Linux kernel versions? A usage example in Python: Answer No. Look at libeatmydata, and this presenta…
Gearman , php extension problem : Class ‘GearmanWorker’ not found in .. using terminal but works on browser
I’ve installed gearman on ubuntu 10.04 recently and installed it’s pecl extension. Now , when I run a php file in the browser that contains : I get object(GearmanWorker)#1 (0) { } but when running the a real worker file in terminal (by root) , I get this: The worker code : Please help! Answer Type…
Crash when calling autoSizeColumn on worksheet, when run under Linux (Servicemix)
I’ve written module that generates excel, and deployed it under Servicemix. In Windows environment everything is fine, but under Linux Servicemix unexpectedly crashes on following call: I’m using POI version 4.2-FINAL, FuseESB 4.2, Java 5.0. There are, however, no hs_err*.pid files. Servicemix log…
Uploading all my files to GitHub
I created a new repo on github called GHide. The repo is completely empty. I read the instructions on github for a hello-world repo. But I can’t find out how I can upload my existing GHide files from my computer to the GitHub repo. How is that to be done. I am using Linux so command-line git commands wi…
Check if mysql database exists, perform action based on result
Is it possible from within a bash script to check if a mysql database exists. Depending on the result then perform another action or terminate the script? Answer Example script (Thanks to Bill Karwin for the –user and –password comment!): These are what the commands look like when run at a prompt:…
Omitting the first line from any Linux command output
I have a requirement where i’d like to omit the 1st line from the output of ls -latr “some path” Since I need to remove total 136 from the below output So I wrote ls -latr /home/kjatin1/DT_901_linux//autoInclude/system | tail -q which excluded the 1st line, but when the folder is empty it do…
SVN Update Crontab Linux
I am trying to figure out how to run a SSH command via cron for linux. The command I want to run is: Something like: Anyone know what I would need to do with the cron line? EDIT: I don’t need it to be SSH, just need to run svn update on the same server as cron to the working