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 128meg swap file.
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 executable the executes in all Linux distributions. However, you can compile an
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 presentation: Eat My Data: How Everybody Gets File
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 php –ini at your
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 logs ends on first autoSizeColumn call. Did anyone met such behaviour and know, how it is caused and
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 will be
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: If no DB exists, the output will look
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 does not omit it. Please tell me how
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