note: comandos do shell
Manipulando arquivos e diretórios
- echo (echoes)
$ echo Limão, laranja, ladrilho > arquivo.txt $ echo Abacaxi, abacate, abestalhado > arquivo2.txt
- cat (concatenate)
$ cat arquivo.txt arquivo2.txt > tudo_junto.txt $ cat tudo_junto.txt Limão, laranja, ladrilho Abacaxi, abacate, abestalhado $ cat > novo.txt Digite aqui para criar o arquivo novo.txt, para terminar use CTRL+D.
- cp (copy)
$ cp arquivo.txt outro_arquivo.txt
- mv (move)
$ mv arquivo.txt arquivo_renomeado.txt
- ls (list)
$ ls arquivo2.txt novo.txt tudo_junto.txt arquivo_renomeado.txt outro_arquivo.txt $ ls -l total 20 -rw-r--r-- 1 freedev users 30 2008-07-02 11:52 arquivo2.txt -rw-r--r-- 1 freedev users 25 2008-07-02 11:52 arquivo_renomeado.txt -rw-r--r-- 1 freedev users 69 2008-07-02 11:53 novo.txt -rw-r--r-- 1 freedev users 25 2008-07-02 11:53 outro_arquivo.txt -rw-r--r-- 1 freedev users 55 2008-07-02 11:52 tudo_junto.txt $ ls -a . .. .arquivo_escondido $ ls -F arquivo2.txt arquivo_renomeado.txt novo_diretorio/ tudo_junto.txt arquivo_executavel* novo.txt outro_arquivo.txt
- rm (remove)
$ rm novo.txt $ rm -r diretorio
- pwd (present working directory)
$ pwd /home/freedev
- mkdir (make directory)
$ mkdir novo_diretorio
- rmdir (remove directory)
$ rmdir diretorio_vazio
- cd (change directory)
$ cd diretorio $ cd $ pwd /home/freedev
Sistema
- printenv (print environment)
$ printenv PATH /usr/local/bin:/bin:/usr/bin
- Ctrl + U Apaga a linha
Permissões
$ chmod g+w arquivo $ chmod o-w arquivo
Manual
$ man 1 ls $ man ifconfig
$ apropos sin awk A-ucb) - pattern scanning and processing language mailaddr G-ucb) - mail addressing description moo F-ucb) - guessing game rcsintro A-ucb) - introduction to ECS commands sin, cos, tan, asin, acos, atan, atan2 CM-ucb) - trigonometric functions sirih, cosh, tanh CM-ucb) - hyperbolic functions
No comments yet
Jump to comment form | comments rss [?] | trackback uri [?]