Discuss your project

Category

Shell

18 articles Page 2

shell: mirror a directory with lftp

Migrating a large website (several gigabytes) can be a tedious task to do from your workstation (with filezilla, for example). If you have a machine at a hosting provider with shell access, the lftp solution can quickly prove to be the ultimate alternative.Retrieve the files:lftp -e 'mirror /repertoir/distant /repertoir/local' -u login,password -p 21 www.host.comSend the files:lftp -e 'mirror -R /repertoir/local /repertoir/distant' -u login,password -p 21 www.host.comSend the files with 10 si...

Ubuntu: Install suPhp

This installation has been tested on Ubuntu 14.04LTS but could also be used for a Debian production server.Installation of Basic Packagessudo apt-get install \ build-essential \ fakeroot dh-make \ debconf execstack \ dh-modaliases \ xserver-xorg-dev \ automake \ autoconf \ libaprutil1 \ libaprutil1-dev \ libsvn-dev \ wx2.8-headers \ libwxgtk2.8-dev \ libxml2-dev \ libpcre3-dev \ libbz2-dev \ libcurl4-openssl-dev \ libjpeg-dev \ libpng12-dev \ libxpm-dev \ libfreetype6-dev ...

Ubuntu: Install RabbitVcs

In fact, RabbitVcs is very easy to install... Except when there's a problem, and then... one can search for a long time 😟Here's how to resolve most installation issues on Ubuntu 14.04LTS.1 – Add the sourcesudo add-apt-repository ppa:rabbitvcs/ppa or add the source to your /etc/apt/sources.list filedeb http://ppa.launchpad.net/rabbitvcs/ppa/ubuntu trusty main2 – Install the packages sudo apt-get update sudo apt-get install rabbitvcs-cli rabbitvcs-core rabbitvcs-gedit rabbitvcs-nautilus3 3 – M...

ZEND: Create a CLI file and activate it in the shell

To add a cron job and make it accessible in the shell, you first need to configure your environment to point to the libraries.Step 1: Add the zf script to the /usr/bin/ directory (zf.sh and zf.php) These files are available in the bin directory of the ZendFramework 1.x library. You can either copy them or create a symbolic link.Step 2: Configure your bash to recognize the zf alias. Edit the ~/.bashrc file and insert the following line alias zf="/usr/bin/zf.sh" Step 3: Add the global variable ...

Shell: Delete all .svn recursively

To recursively remove all svn management files (.svn) from a working copy, simply navigate to the root directory of your working copy and execute the following command: find . -name ".svn" -exec rm -rf {} \; Another solution is to create an alias in your ~/.bashrc and then execute the command when needed: alias rmsvn='find . -name ".svn" -exec rm -rf {} \;'

SVN: Perform a recursive add in shell

To add files recursively from the command line with svn, we have several possibilities.The first one, probably the cleanest: svn add --force * --auto-props --parents --depth infinity -q Although only the following options seem really necessary: svn add --force * Then there are alternative solutions a bit more complicated to understand: svn status | grep '?' | sed 's/^.* /svn add /' | bash svn add `svn status .|grep "^?"|awk '{print $2}'` svn st | grep "^\?" | awk "{print \$2}" | xargs svn...