txt

Linux commands and code snippets collection

  • Home
  • About

Category Archives: Linux

22 Jul

Trasfer over the network

Transfer stdin and stdout to and from machines over the network


ssh remote_machine 'cat - > file' < file
Binny V A Posted in Command Line, Linux cat, filler, network, shellfu, ssh, stdin Leave a comment
07 Jul

Add Line Numbers

Use this command to add line numbers to a text file…


sed = filename.txt | sed 'N;s/\n/\t/' > filename_number.txt
Binny V A Posted in Command Line, Linux command, line, Linux, number, numbering, sed, shellfu 3 Comments
06 Jul

Install Package List

Install a list of packages from a text file.


cat packages.txt | xargs apt-get install
Binny V A Posted in Command Line, Linux command, file, install, Linux, list, package, text Leave a comment
04 Jul

Rename Command

Different way to use the rename command.


rename 's/.html$/.php/' *.html
Binny V A Posted in Command Line, Linux command, file, Linux, rename, shellfu Leave a comment
03 Jul

Get a Random Futurama Quote

Useless – but fun – get a random Futurama Quote


curl -Is slashdot.org | egrep '^X-(F|B)' | cut -d \- -f 2
Binny V A Posted in Command Line, Linux curl, futurama, quote, random, slashdot Leave a comment
02 Jul

Create Random Password

Use this command to create a random password


< /dev/urandom tr -dc A-Za-z0-9_ | head -c8

Also see…

Binny V A Posted in Command Line, Linux command, head, Linux, password, random, shell, shellfu, tr, urandom Leave a comment
30 Jun

CDPATH

CDPATH is to cd what PATH is to exectable. You can go to a folder inside any of the CDPATH folders by just cd 'folder name' – no mater where you are currently.


export CDPATH='.:~:/var/www/html:~/Scripts'
Binny V A Posted in Command Line, Linux cdpath, command, Linux, path, shellfu Leave a comment
28 Jun

Use ffmpeg to create a screencast

You can use this command to create a screencast using ffmpeg.


ffmpeg -f x11grab -s 800x600 -i :0.0 /tmp/screencast.mpg
Binny V A Posted in Command Line, Linux command, ffmpeg, filler, Linux, screencast, video Leave a comment
26 Jun

Backup Del.icio.us posts

Backup all delicious bookmarks using this command


wget --user=username --password=password https://api.del.icio.us/v1/posts/all -O bookmarks.xml
Binny V A Posted in Command Line, Linux backup, bookmark, command, delicious, Linux, wget Leave a comment
25 Jun

Replacing in Found Files

Replace one string by another in all file found by find.


find . -name *whatyouwant* -exec perl -pi.bak -e 's/TEXT_TO_REPLACE/TEXT_TO_REPLACE_IT_WITH/g' {} \;
Binny V A Posted in Command Line, Linux, Perl command, find, Linux, Perl, replace, string, text Leave a comment

Post navigation

← Older posts
Newer posts →

Archives

  • October 2017
  • November 2015
  • August 2014
  • November 2013
  • August 2012
  • May 2012
  • March 2012
  • October 2011
  • August 2011
  • January 2011
  • October 2010
  • October 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007

Meta

  • Log in
Fruitful theme by fruitfulcode Powered by: WordPress
↑