Shelltalk

306 views
267 views

Published on

A gentle introduction to BASH commmands

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
306
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Levecomoquemdiz
  • The user must have write permission in the parent directory.
  • If the permissions of the file do not permit writing, and the standard input device is a terminal, the user is prompted(on the standard error output) for confirmation. The rm utility removes symbolic links, not the files referenced by the links.
  • If the permissions of the file do not permit writing, and the standard input device is a terminal, the user is prompted(on the standard error output) for confirmation. The rm utility removes symbolic links, not the files referenced by the links.
  • If the permissions of the file do not permit writing, and the standard input device is a terminal, the user is prompted(on the standard error output) for confirmation. The rm utility removes symbolic links, not the files referenced by the links.
  • Shelltalk

    1. 1. Shell Talk<br />Umaintroduçãoao Linux e BASH<br />Luís Ferreira e André Santos<br />
    2. 2. Linux<br />Grátis<br />Open – Source<br />Leve<br />Seguro<br />
    3. 3. Shell<br />Bourne Again Shell<br />Korn Shell<br />Bourne Shell<br />C Shell<br />
    4. 4. Organização das directorias<br />
    5. 5. Print Working Directory<br /> $pwd [-LP]<br />Opções:<br /> -P : The pathname printed will not contain symbolic links. <br /> -L : The pathname printed may contain symbolic links<br />Exemplo:<br />
    6. 6. Change Directory<br /> $cd [Opções] [Directoria] <br />Opções:<br /> -P Do not follow symbolic links <br /> -L Follow symbolic links (default)<br />Exemplo:<br />
    7. 7. Organização das directorias<br />
    8. 8. Change Directory<br />$ cd .<br />$ cd<br />DirectoriasEspeciais<br />Voltaratrásrapidamente:<br />Subirumadirectoria:<br />Directoria actual:<br />Irpara HOME:<br />
    9. 9. List Directory Contents<br /> $ ls [-ABCFGHLPRSTW@abcdefghiklmnopqrstuwx1] [file ...]<br />Opções:<br /> -l List in long format<br /> -a List all entries incluiding those beginning with ‘.’<br /> -G Enable colorized output<br /> -h When used with the -l option, use unit suffixes<br />Exemplo:<br />
    10. 10. Make Directories<br /> $ mkdir [-pv] [-mmodo] nome_directoria ...<br />Opções:<br /> -p Create intermediate directories as required<br /> -v Be verbose when creating directories, listing them as they are created<br />Modo<br />Pordefeitoomodoé 0777, podendo ser definido de qualquer forma aceitepelochmod<br />Exemplo:<br />
    11. 11. Organização das directorias<br />
    12. 12. Remove<br /> $ rm [-dfiPRrvW] ficheiro ...<br />Opções:<br /> -f Attempt to remove the files without prompting for confirmation<br /> -R Attempt to remove the file hierarchy rooted in each file argument<br />Exemplo:<br />
    13. 13. Organização das directorias<br />
    14. 14. Copy Files<br />$cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_filetarget_file<br />$cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file ... target_directory<br />Opções:<br /> -R If source_file designates a directory, cp copies the directory and the entire subtree connected at that point.<br />Exemplo:<br />
    15. 15. Organização das directorias<br />
    16. 16. Move Files<br />$ mv [-f | -i | -n] [-v] source target (rename)<br />$ mv [-f | -i | -n] [-v] source ... Directory<br />Exemplo:<br />
    17. 17. Organização das directorias<br />
    18. 18. Touch<br />$touch [-acfm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] ficheiro ...<br />Funcionamento:<br /> Se oficheironãoexistireleécriado, se existe a data daúltimamodificaçãoéactualizadapara a data actual<br />Exemplo:<br />
    19. 19. Organização das directorias<br />
    20. 20. Modos<br />
    21. 21. ModosAbsolutos<br />Soma de modos simples paraformarmodosabsolutos:<br /> O modoabsolutoquepermiteleitura, escritaeexecuçãopelo owner, leituraeexecuçãopormembros do grupoepelosoutroséo 755 (400 + 200 + 100+ 040 + 010 + 004 + 001)<br />Símbolosperm:<br />O equivalenteaomodoabsoluto 755 com símbolospermseriau=rwx, go=rx<br />
    22. 22. Change Mode<br /> $chmod [-fv] [-R [-H | -L | -P]] modoficheiro ...<br />Opções:<br /> -R Change the modes of the file hierarchies rooted in the files instead of just the files themselves<br />Exemplo:<br />
    23. 23. Execute as another user<br />$sudo [-u] comando<br />Opções:<br /> -u causes sudo to run the specified command as a user other than root<br />Exemplo:<br />
    24. 24. Manual pages<br /> $man [-acdfFhkKtwW] [--path] [-m system] [-p string] [-C config_file] [-M pathlist] [-P pager] [-B browser] [-H htmlpager] [-S section_list] [section] name ...$ mv [-f | -i | -n] [-v] source ... Directory<br />Utilização:<br />
    25. 25. FIM<br />

    ×