Category: Command Line
Find Link Files
Use this command to find all the links in the current directory… find . -lname “*”
Locate Files With Names Matching A Regexp
You can use locate to find files with name that matches a said regexp… locate -i -r ‘\.jpg$’
Delete Leading Whitespace Using Sed
Delete leading whitespace (spaces/tabs/etc) from beginning of each line. Same as yesterday’s command – but using sed cat file.txt |…
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
Recent Comments