Ir para o conteúdo
ou

Software livre Brasil

Tela cheia Sugerir um artigo
 Feed RSS

CommandLineFu

4 de Junho de 2009, 0:00 , por Software Livre Brasil - | Ninguém está seguindo este artigo ainda.

Troca de conhecimentos sobre o uso da linha de comando e referencia direta ao site commandlinefu.com.


Remove all files previously extracted from a tar(.gz) file.

7 de Julho de 2009, 0:00, por Software Livre Brasil - 0sem comentários ainda$ tar -tf <file.tar.gz> | xargs rm -r
(by prayer)

commandlinefu.com

by David Winterbottom (codeinthehole.com)



Cracking a password protected .rar file

7 de Julho de 2009, 0:00, por Software Livre Brasil - 0sem comentários ainda$ for i in $(cat dict.txt);do unrar e -p$i protected.rar; if [ $? = 0 ];then echo "Passwd Found: $i";break;fi;done

Cracking a password protected .rar file in a line, by dictionary attack method. All you need is a good dictionary (dict.txt).

(by ksaver)

commandlinefu.com

by David Winterbottom (codeinthehole.com)



Print a great grey scale demo !

6 de Julho de 2009, 0:00, por Software Livre Brasil - 0sem comentários ainda$ yes "$(seq 232 255;seq 254 -1 233)" | while read i; do printf "\x1b[48;5;${i}m\n"; sleep .01; done

commandlinefu.com

by David Winterbottom (codeinthehole.com)



List programs with open ports and connections

6 de Julho de 2009, 0:00, por Software Livre Brasil - 0sem comentários ainda$ lsof -i

I prefer to use this and not the -n variety, so I get DNS-resolved hostnames. Nice when I'm trying to figure out who's got that port open.

(by unixmonkey4503)

commandlinefu.com

by David Winterbottom (codeinthehole.com)



Convert "man page" to text file

5 de Julho de 2009, 0:00, por Software Livre Brasil - 0sem comentários ainda$ man ls | col -b > ~/Desktop/man_ls.txt

You can convert any UNIX man page to .txt

(by vigo)

commandlinefu.com

by David Winterbottom (codeinthehole.com)



throttle bandwidth with cstream

4 de Julho de 2009, 0:00, por Software Livre Brasil - 0sem comentários ainda$ tar -cj /backup | cstream -t 777k | ssh host 'tar -xj -C /backup'

this bzips a folder and transfers it over the network to "host" at 777k bit/s.

cstream can do a lot more, have a look http://www.cons.org/cracauer/cstream.html#usage

for example:

echo w00t, i'm 733+ | cstream -b1 -t2

hehe :)

(by wires)

commandlinefu.com

by David Winterbottom (codeinthehole.com)



Twitter update from terminal (pok3's snipts ?)

3 de Julho de 2009, 0:00, por Software Livre Brasil - 0sem comentários ainda$ curl -u YourUsername:YourPassword -d status="Your status message go here" http://twitter.com/statuses/update.xml

Found it on snipt, pok3, is it yours?

I put my user = m33600, the password and the status was my robot message:

Settima robot message: ALARM ZONE 3 (sent via command line).

Now bots may have their identity on twitter...

(by m33600)

commandlinefu.com

by David Winterbottom (codeinthehole.com)



Matrix Style

1 de Julho de 2009, 0:00, por Software Livre Brasil - 0sem comentários ainda$ tr -c "[:digit:]" " " < /dev/urandom | dd cbs=$COLUMNS conv=unblock | GREP_COLOR="1;32" grep --color "[^ ]"
(by allinurl)

commandlinefu.com

by David Winterbottom (codeinthehole.com)



Smiley Face Bash Prompt

1 de Julho de 2009, 0:00, por Software Livre Brasil - 0sem comentários ainda$ PS1="\`if [ \$? = 0 ]; then echo \e[33\;40m\\\^\\\_\\\^\e[0m; else echo \e[36\;40m\\\-\e[0m\\\_\e[36\;40m\\\-\e[0m; fi\` \u \w:\h)"

If your last command was a dud, your bash prompt will be angry at you. Otherwise it's happy. Soon you will crave its constant approval and your linux skills will improve simply to avoid low self-esteem.

(by digitalsushi)

commandlinefu.com

by David Winterbottom (codeinthehole.com)



replace spaces in filenames with underscores

30 de Junho de 2009, 0:00, por Software Livre Brasil - 0sem comentários ainda$ rename 'y/ /_/' *

This command will replace all the spaces in all the filenames of the current directory with underscores. There are other commands that do this here, but this one is the easiest and shortest.

(by signal9)

commandlinefu.com

by David Winterbottom (codeinthehole.com)



Tags deste artigo: cli commandline unix terminal