Guia do Linux/Iniciante+Intermediário/Comandos diversos
Aparência
- 10.1 clear
- 10.2 date
- 10.3 df
- 10.4 ln
- 10.5 du
- 10.6 find
- 10.7 free
- 10.8 grep
- 10.9 head
- 10.10 nl
- 10.11 more
- 10.12 less
- 10.13 sort
- 10.14 tail
- 10.15 time
- 10.16 touch
- 10.17 uptime
- 10.18 dmesg
- 10.19 mesg
- 10.20 echo
- 10.21 su
- 10.22 sync
- 10.23 uname
- 10.24 reboot
- 10.25 shutdown
- 10.26 wc
- 10.27 seq
- 10.28 chattr
- 10.29 lsattr
- 10.30 cut
- 10.31 cmp
- 10.32 dirname
- 10.33 diff
- 10.34 pr
- 10.35 patch
- 10.36 whereis
- 10.37 which
- 10.38 zforce
- 10.39 gzexe
- 10.40 znew
| Este módulo encontra-se em processo de tradução. A sua ajuda é bem vinda. |
Capítulo 10 - Comandos Diversos
[editar | editar código]Comandos de uso diversos no sistema.
| Comando | Descrição |
| alias | Cria um alias |
| apropos <palavra> | Procura nos manuais por <palavra> |
| at HH:MM | Executa uma tarefa na hora e minutos especificados |
| awk | Manipulação de texto em arquivo(s) |
| break | Termina um loop |
| builtin | Run a shell builtin |
| bunzip2 | Decomprime arquivo no formato bzip2 |
| bzip2 | Comprime arquivo no formato bzip2 |
| cal | Mostra um calendário |
| case | Execução condicional de comando |
| cat | Exibe arquivos na saída padrão (standard output) |
| cd | Muda diretório |
| cfdisk | Manipulador de partition table |
| chgrp | Mudança de grupo |
| chmod | Muda permissões de acesso |
| chown | Muda dono e grupo do arquivo |
| chroot | Executa um comando com um diretório raiz diferente |
| chvt | Muda o terminal virtual |
| cksum | Exibe CRC checksum e contador de bytes |
| clear | Limpa a tela do terminal |
| cmp | Compara dois arquivos |
| comm | Compara dois arquivos ordenados linha por linha |
| command | Executa um comando, ignorando funções do shell |
| compress | Comprime arquivos |
| continue | Passa para o próximo passo de um loop, ignorando comandos seguintes |
| convmv | Script em Perl que converte nomes de arquivos entre convenções diferentes |
| cp | Copia arquivo(s) |
| cron | Daemon para executar comandos em dias ou horas pre-definidos |
| crontab | Exibe ou atualiza a tabela de tarefas executadas pelo daemon cron |
| csplit | Quebra um arquivo em partes |
| cut | Divide um arquivo em várias partes |
| date | Display or change the date & time |
| dc | Desk Calculator |
| dd | Data Dump - Converte e copia um arquivo |
| declare | Declara variáveis e dá seus atributos |
| df | Mostra o espaço livre em disco |
| diff | Mostra as diferenças entre arquivos (e não mostra nada se os arquivos são iguais) |
| diff3 | Mostra as diferenças entre três arquivos |
| dir | Lista o conteúdo de um diretório |
| dircolors | Colour setup for `ls' |
| dirname | Convert a full pathname to just a path |
| dirs | Display list of remembered directories |
| du | Estimate file space usage Mostra o tamanho de arquivos em disco, para cada diretório |
| echo | Imprime alguma mensagem na tela, no modo texto |
| ed | A line-oriented text editor (edlin) |
| egrep | Search file(s) for lines that match an extended expression |
| eject | Ejeta CD-ROM |
| enable | Enable and disable builtin shell commands |
| env | Disp, set, or remove environment variables |
| eval | Evaluate several commands/arguments |
| exec | Executa um comando |
| exit | Sai do shell (terminal) |
| expand | Converte tab para espaço |
| export | Define uma variável de ambiente |
| expr | Evaluate expressions |
| factor | Print prime factors Imprime fatores primos |
| false | Do nothing, unsuccessfully |
| fdformat | Low-level format a floppy disk |
| fdisk | Manipulador de partições para Linux |
| fgrep | Search file(s) for lines that match a fixed string |
| file | Determinar o tipo de um arquivo |
| find | Search for files that meet a desired criteria |
| fmt | Reformat paragraph text |
| fold | Wrap text to fit a specified width. |
| for | Expand words, and execute commands |
| format | Format disks or tapes |
| free | Disp, s memory usage |
| fsck | Filesystem consistency check and repair. |
| fstat | Lista arquivos abertos |
| function | Define macros (funções) |
| fuser | Identify process using file |
| gawk | Find and Replace text within file(s) |
| getopts | Parse positional parameters |
| grep | Procura no(s) arquivo(s) as linhas que casam com um determinado padrão (usando expressões regulares) |
| groups | Print group names a user is in |
| gunzip | Descompacta arquivos do tipo GNU zip |
| gzcat | Show contents of compressed file(s) |
| gzip | Compress file(s) to GNU zip format |
| hash | Remember the full pathname of a name argument |
| head | Output the first part of file(s) |
| history | Command History |
| hostname | Print or set system name |
| iconv | Converts the encoding of characters from one code page encoding scheme to another. |
| id | Print user and group id's |
| if | Testa uma variável lógica, e executa comandos apenas no caso desta variável ser verdadeira. A forma do comando é if (condição); then (comandos); fi |
| import | Capture an X server screen and save the image to file |
| info | Help info |
| install | Copy files and set attributes |
| join | Join lines on a common field |
| kill | Stop a process from running |
| less | Display output one screen at a time |
| let | Perform arithmetic on shell variables |
| ln | Make links between files |
| local | Create variables |
| locate | Localiza arquivos do sistema indexados em /var/lib/mlocate/mlocate.db. |
| logname | Print current login name |
| logout | Exit a login shell |
| lpc | Line printer control program |
| lpr | Off line print |
| lprint | Print a file |
| lprintd | Abort a print job |
| lprintq | List the print queue |
| lprm | Remove jobs from the print queue |
| ls | List information about file(s) |
| ll | #ls -l List information about file(s) |
| lsof | List open files |
| m4 | Macro processor |
| makewhatis | Rebuild whatis database |
| man | Print manual pages |
| mkdir | Create new folder(s) |
| mkfifo | Make FIFOs (named pipes) |
| mknod | Make block or character special files |
| more | Display output one screen at a time |
| mount | Mount a file system |
| mtools | Manipulate MS-DOS files |
| mv | Move or rename files or directories |
| netconfig | Configure your network |
| nice | Set the priority of a command or job |
| nl | Number lines and write files |
| nohup | Run a command immune to hangup |
| od | View binary files |
| passwd | Modify a user password |
| paste | Merge lines of files |
| pathchk | Check file name portability |
| popd | Restore the previous value of the current directory |
| pr | Convert text files for printing |
| printcap | Printer capability database |
| printenv | Print environment variables |
| printf | Format and print data |
| ps | Process status |
| pushd | Save and then change the current directory |
| pwd | Exibe o atual diretório |
| quota | Display disk usage and limits |
| quotacheck | Scan a file system for disk usage |
| quotactl | Set disk quotas |
| pax | Archive file(s) |
| ram | ram disk device |
| rcp | Copy files between two machines. |
| read | read a line from standard input |
| readonly | Mark variables/functions as readonly |
| remsync | Synchronize remote files via email |
| return | Exit a shell function |
| rm | Remove (delete) files |
| rmdir | Remove folder(s) |
| rpm | RPM Package Manager (was RedHat Package Manager) |
| rsync | Remote file copy (Synchronize file trees) |
| screen | Terminal window manager |
| sdiff | Merge two files interactively |
| scp | Copia de arquivos entre computadores de uma mesma rede local, através de comandos do tipo scp "10.1.1.3:/home/jimbo/wales.jpg" .. Para mais detalhes, ver a documentação |
| sed | Stream Editor |
| select | Accept keyboard input |
| seq | Print numeric sequences |
| set | Manipulate shell variables and functions |
| shift | Shift positional parameters |
| shopt | Shell Options |
| shutdown | Shutdown or restart linux |
| sleep | Delay for a specified time |
| sort | Sort text files |
| source | Run commands from a file `.' |
| split | Split a file into fixed-size pieces |
| ssh | Permite login remoto em outras máquinas de uma rede local, através de ssh jimbo@10.1.1.2. Ver a documentação para mais detalhes. |
| strings | print the strings of printable characters in (binary) files. |
| su | Substitute user identity |
| sum | Print a checksum for a file |
| symlink | Make a new name for a file |
| sync | Synchronize data on disk with memory |
| tac | Print files out in reverse line order |
| tail | Output the last part of files |
| tar | Tape ARchiver |
| tee | Redirect output to multiple files |
| test | Usado antes de uma expressão lógica, por exemplo, para testar a existência de arquivos ou a comparação de strings. Pode ser usado como comando (test (alguma coisa)...) ou logo após um if (if test (alguma coisa); then ...; fi) |
| time | Measure Program Resource Use |
| times | User and system times |
| timidity | Play midi files and set up software synth to play midi files with other commands. |
| touch | Change file timestamps |
| top | List processes running on the system |
| traceroute | Trace Route to Host |
| trap | Run a command when a signal is set(bourne) |
| tr | Translate, squeeze, and/or delete characters |
| true | Do nothing, successfully |
| tsort | Topological sort |
| tty | Print filename of terminal on stdin |
| type | Describe a command |
| typeset | Precedendo a declaração de uma variável, define o seu tipo. Exemplo: typeset -i x = 1 define x como inteiro |
| ulimit | Limit user resources |
| umask | Users file creation mask |
| umount | Unmount a filesystem |
| unalias | Remove an alias |
| uname | Exibe informações sobre o sistema (versão do Linux, nome do computador, etc) |
| unexpand | Convert spaces to tabs |
| uniq | Uniquify files (remove all duplicate lines) |
| units | Convert units from one scale to another |
| unset | Remove variable or function names |
| unshar | Unpack shell archive scripts |
| until | Execute commands (until error) |
| useradd | Create new user account |
| usermod | Modify user account |
| users | List users currently logged in |
| uuencode | Encode a binary file into 7-bit ASCII characters |
| uudecode | Decode a file created by uuencode |
| v | Verbosely list directory contents (`ls -l -b') |
| vdir | Verbosely list directory contents (`ls -l -b') |
| watch | Execute/display a program periodically |
| whatis | List manual pages by name |
| wc | Print byte, word, and line counts of a file |
| whereis | Report all known instances of a command |
| which | Locate a program file in the user's path. |
| while | Execute commands |
| who | Print all usernames currently logged in |
| whoami | Print the current user id and name (`id -un') |
| xargs | Execute utility, passing constructed argument list(s) |
| Xdialog | Abre uma janela gráfica de diálogo modal [1] |
| yes | Print a string until interrupted |
| zcat | Show contents of compressed file(s) |
| zenity | Abre uma janela gráfica de diálogo modal [2] |
| zip | Compress and archive file(s) to zip format |
| .period | Run commands from a file |
| ### | Comment / Remark |
Referências
[editar | editar código]- ↑ Programando em Xdialog, site www.vivaolinux.com.br
- ↑ Zenity: interface gráfica para scripts, site www.guiadohardware.net