Contar n linhas ficheiro texto

wc -l nome_do_ficheiro

Espaço ocupado em disco
du -hs Espaço total ocupado sem mostrar directorios
du -h --max-depth=1 Espaço ocupado por cada uma das subdirectorias correntes
Procurar ficheiros em disco find -name "file" procura no directorio e todos os subdirectorios, para mais opções ver man (tem mm de ser :-() mas assim ja da para a maior parte das pesquisas
Alterar texto da bash esport PS1="cmd" com cmd um conjunto dos seguintes
\a    The ASCII bell character (you can also type \007)   
\d    Date in "Wed Sep 06" format   
\e    ASCII escape character (you can also type \033)   
\h    First part of hostname (such as "mybox")   
\H    Full hostname (such as "")   
\j    The number of processes you've suspended in this shell by hitting ^Z   
\l    The name of the shell's terminal device (such as "ttyp4")   
\n    Newline   
\r    Carriage return   
\s    The name of the shell executable (such as "bash")   
\t    Time in 24-hour format (such as "23:01:01")   
\T    Time in 12-hour format (such as "11:01:01")   
\@    Time in 12-hour format with am/pm   
\u    Your username   
\v    Version of bash (such as 2.04)   
\V    Bash version, including patchlevel   
\w    Current working directory (such as "/home/drobbins")   
\W    The "basename" of the current working directory (such as "drobbins")    
\!    Current command's position in the history buffer   
\#    Command number (this will count up at each prompt, as long as you type something)   
\$    If you are not root, inserts a "$"; if you are root, you get a "#"   
\xxx    Inserts an ASCII character based on three-digit number xxx (replace unused digits with zeros, such as "\007")   
\    A backslash   
    This sequence should appear before a sequence of characters that don't move the cursor (like color escape sequences). This allows bash to calculate word wrapping correctly.        This sequence should appear after a sequence of non-printing characters.

Última alteração: sábado, 4 agosto 2012, 18:16