Tag: command

Delete Leading Whitespace

Delete leading whitespace (spaces/tabs/etc) from beginning of each line ruby -pe ‘gsub(/^\s+/, “”)’ < file.txt

Find files of a specific mime-type

Use this command to find files of a given mime-type. In this example, we are looking for video files… find…

Restrict Top to Current User’s Commands

Show only your processes in the top list using this command… top -u `whoami` OR top -u binnyva(your username)

Find Remaining Battery Power

Find the remaining battery power in your laptop using this command in Linux. acpi -V

Post To Identi.ca using Curl

Post a status update to identi.ca using just curl curl –basic –user binnyva:PASSWORD –data-ascii “status=The new status goes here” http://identi.ca/api/statuses/update.xml

Django server on custom Port

Running Django server on a custom Port python manage.py runserver 8001

Install LAMP Stack on Ubuntu/Debian

Install LAMP Stack on Ubuntu/Debian using apt-get sudo apt-get install openssh-server openssh-client apache2 libapache2-mod-php5 php5-cli php5-common php5-cgi mysql-client mysql-common mysql-server…

Start a new Django Project

Command to start a new Django project… django-admin.py startproject [PROJECT_NAME] cd [PROJECT_NAME] python manage.py startapp [PROJECT_NAME]

Double space a file using Ruby

Double space a file with Ruby using the command ruby -pe ‘puts’ < file.txt

List Files Provided by Package

Show list of files provided by a rpm package installed rpm -ql package_name