Posts Tagged With: shellfu

Trasfer over the network

Tagged with: , , , , ,

Transfer stdin and stdout to and from machines over the network


ssh remote_machine 'cat - > file' < file
No Comments »

Add Line Numbers

Tagged with: , , , , , ,

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


sed = filename.txt | sed 'N;s/\n/\t/' > filename_number.txt
3 Comments »

Rename Command

Tagged with: , , , ,

Different way to use the rename command.


rename 's/.html$/.php/' *.html
No Comments »

Create Random Password

Tagged with: , , , , , , , ,

Use this command to create a random password


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

Also see…

No Comments »

CDPATH

Tagged with: , , , ,

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'
No Comments »