Posts

Showing posts with the label linux

How to Copy / Backup files without booting Windows

Image
If you are a Windows user, you will face boot error. I had one recently and had to format the whole computer. I needed to backup my precious files. If the computers not booting up, doing this can be tricky. This is where our friend Penguin (Linux) comes to the picture. Here’ how to do it: 1) Download Mandriva Linux or Ubuntu Linux. (Ubuntu Preferred) 2) Write it on a CD and boot it on your computer (Make sure you have the boot priority sorted). You can also make a bootable Pen / Flash drive. 3) Select Live CD option   and then, backup your data! Note: You’ll need another host computer to prepare Linux boot disk. Technorati Tags: copy,backup,files,without,booting,windows,linux,ubuntu,mandriva

Increase Typing Speed, Comfort with Dvorak Keyboard Layout

Image
QWERTY is the most used Keyboard layout in the world. It was designed to minimize typebar clashes in a typewriter. Now, in the computer age, we are still using the old design instead of the new and improved design – The Dvorak Simplified Keyboard. This layout has better ergonomics, reduces fatigue, increases typing speed etc (More Info). As a matter of fact, you can also type with one finger! But, sadly, it hasn’t been able to replace QWERTY. Nowadays, almost all the Operating Systems are offering support for this Layout. So, you can take advantage of this layout. True, there is a learning curve, but you’ll thank me after sometime. You can always convert your QWERTY keyboard into a Dvorak Keyboard. This is very simple. And Don’t worry, you can switch between Layouts with a press of a Button. First, Setup your operating System. For Windows, Linux: loadkeys /usr/share/keymaps/i386/dvorak/dvorak.map.gz or loadkeys dvorak 3. Mac Now, buy some  keyboard stickers (They...

Need a way to temporarily redirect STDOUT

Need a way to temporarily redirect STDOUT I know how to redirect output in Linux. Thing is, I have alot of output in my bash script and I don't want to type something like echo $foo >> bar over and over again. I would much rather do something like: hey, bash, for the time being put all your STDOUT in "bar" echo $foo . . OK, bash, you can go back to regular STDOUT now I tried opening FD 1 as a file: exec 1>bar but couldn't get STDOUT back to normal when I was done. Closing the file exec 1>&- gave me errors that I couldn't get around. Any way to do this? Thanks! 3 Answers 3 You have to first save stdout (by linking it on fd #4 for instance) exec 4<&1 Redirect stdout exec 1>bar And restore saved stdout exec 1<&4 OK, learned something new about file descriptors here. Any references on what it means to 'save' ...

Executing Linux commands from webpage

Executing Linux commands from webpage I have set up a very basic website on apache2 server (running on Ubuntu 18.04). The website has just one page. I used some JavaScript to add dynamic content to it, and the website contains HTML form, which sends data to MySql server -- I connected to the database with PHP. Based on user input, I need to execute a certain Linux terminal command (say: ls -l ). For example, if user inputs first and last names and clicks on Submit button, the ls -l command will automatically execute without user doing anything in terminal. Is this possible? This is the HTML form I have: ls -l ls -l <form method="post"> <label>Fisrt Name: <input type="text" name="firstname" required></label> <label>Last Name: <input type="text" name="lastname" required></label> <input type="submit" name="submit" value="Submit"> </form> Edited...

Docker File Non-Zero Code 100 Error When Building

Docker File Non-Zero Code 100 Error When Building Here is my Docker File: FROM ubuntu:16.04 MAINTAINER Alexandre Savio <alexsavio@gmail.com> RUN ln -snf /bin/bash /bin/sh ARG DEBIAN_FRONTEND=noninteractive ENV PETPVC_VERSION v1.2.1 ENV PETPVC_GIT https://github.com/UCL/PETPVC.git ENV ITK_VERSION v4.12.2 ENV ITK_GIT http://itk.org/ITK.git ENV VTK_VERSION v6.3.0 ENV VTK_GIT https://gitlab.kitware.com/vtk/vtk.git ENV SIMPLEITK_VERSION v1.0.1 ENV SIMPLEITK_GIT http://itk.org/SimpleITK.git ENV ANTS_VERSION v2.2.0 ENV ANTS_GIT https://github.com/stnava/ANTs.gi ENV NEURODEBIAN_URL http://neuro.debian.net/lists/xenial.de-m.full ENV NEURODEBIAN_PGP hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 ENV LIBXP_URL http://mirrors.kernel.org/ubuntu/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb ENV AFNI_URL https://afni.nimh.nih.gov/pub/dist/bin/linux_fedora_21_64/@update.afni.binaries ENV CAMINO_GIT git://git.code.sf.net/p/camino/code ENV SPM12_URL http://www.fil.ion.ucl.ac.uk/spm/download/...