Handy shortcuts in bash

ctrl-a – move the cursor to the beginning of the current line ctrl-e – move the cursor to the end of the current line ESC-b – move the cursor backwards one word ESC-f – move the cursor forward one word ctrl-k – delete from cursor to the end of the line ctrl-u – delete from […]

Recent activities

Moved from a pure linux/windows admin role to more of a devops role Getting familiar with aws services Getting more familiar with deployment/maintainance of mobile applications Getting familiar with distributed systems

rsync command to copy files between servers

Copy files from one folder to another in same server rsync -avz /source/folder/ /destination/folder/ Copy files from local server to remote server rsync -avz /source/folder/ root@ip.of.remote.server:/destination/folder/ Copy files from remote server to local server rsync -avz root@ip.of.remote.server:/source/folder/ /destination/folder/ Trailing “/” in the paths are very important in rsync command which should not be skipped. If […]

Dependency issue – python2.7 – Ubuntu 14.04

While installing additional packages in Ubuntu using apt-get command, following error was thrown, Setting up python2.7 (2.7.6-8ubuntu0.2) … Sorry: TypeError: compile() expected string without null bytesdpkg: error processing package python2.7 (–configure) Dependency issue – python2.7 – Ubuntu 14.04 Errors were encountered while processing: python-minimal python libapache2-mod-wsgi lsb-release python-pkg-resources python-setuptools python-pip Configuration files are messed up. […]

Transfer files using ncftp from remote server

If you only have ftp access to a server, you can use ncftp command to transfer the files. Install ncftp in Centos yum install epel-release yum install ncftp Command ncftpget -T -R -v -u “ftpuser” -p “pa55Word” ftp-server-name.net /full/destination/path/in/server /source-folder Above command will transfer contents from source-folder in your remote server to /full/destination/path/in/server/ in your […]

List autostart services in ubuntu

Ubuntu distributions prior 16.04 uses a mix of upstart and SysV. Upstart doesn’t exactly follow the convention of runlevels and process startup in upstart is mostly event driven. So if you don’t find a process in runlevel doesn’t always mean that the process will not get started at that runlevel. To list all processes in […]

View available package updates in Ubuntu

Following command can be used in ubuntu apt-cache policy <package-name> Example: # apt-cache policy linux-image-generic linux-image-generic: Installed: 3.11.0.12.13 Candidate: 3.11.0.26.27 Version table: 3.11.0.26.27 0 500 http://us.archive.ubuntu.com/ubuntu/ saucy-updates/main amd64 Packages 500 http://security.ubuntu.com/ubuntu/ saucy-security/main amd64 Packages *** 3.11.0.12.13 0 500 http://us.archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages 100 /var/lib/dpkg/status