Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Bash Introduction
Search
André Augusto Costa Santos
October 24, 2013
Programming
608
210k
Bash Introduction
Introduction to the Unix command line
André Augusto Costa Santos
October 24, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
670
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
バグを見つけた?それAppleに直してもらおう!
uetyo
0
170
.NET 9アプリをCGIとして レンタルサーバーで動かす
mayuki
1
770
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
200
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
600
선언형 UI에서의 상태관리
l2hyunwoo
0
130
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
200
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
3
860
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Code Review Best Practice
trishagee
65
17k
Facilitating Awesome Meetings
lara
50
6.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Docker and Python
trallard
41
3.1k
Building an army of robots
kneath
302
44k
Automating Front-end Workflow
addyosmani
1366
200k
Transcript
INTRODUCTION BASH
ANDRÉ SANTOS FRANCISCO NEVES 62Gerente
[email protected]
andre-santos.pt francisconeves
[email protected]
francisconeves.com
None
UNIX BASED SYSTEMS
UNIX BASED SYSTEMS STABILITY PERFORMANCE SCALABILITY COMPATIBILITY PRICE VS WINDOWS
BASH? ‣WHAT DOES IT MEAN? ‣ADVANTAGES? WHAT IS
BASH? ‣AUTOCOMPLETE ‣MAN PAGES ‣CLEAR SCREEN HOW TO DEAL WITH
COMMANDS SOME REQUIRED
LIST ls -a -l ALL FILES LONG FORMAT MAKE DIRECTORY
mkdir [OPT] DIR -p MAKE PARENTS
CHANGE DIRECTORY cd PATH . CURRENT DIR ~ .. PARENT
DIR HOME DIR PRINT WORKING DIRECTORY pwd CREATE EMPTY FILE touch FILE
COPY cp [OPT] FROM TO MOVE OR RENAME mv FROM
TO -r COPY DIRECTORIES RECURSIVELY
REMOVE rm [OPT] FILE REMOVE DIRECTORY rmdir [OPT] DIR -r
RECURSIVELY REMOVE DIRECTORIES -f FORCE -p PARENTS
CONCATENATE AND PRINT FILES cat [OPT] FILES less [OPT] FILE
-N NUMBER THE OUTPUT LINES VIEW FILE -l NUMBER THE OUTPUT LINES
FREQUENT COMMANDS LESS Key COMMAND Space NEXT PAGE b PREVIOUS
PAGE j NEXT LINE k PREVIOUS LINE g FIRST LINE G LAST LINE <n>G LINE <n> Key COMMAND /<text> FOWARD SEARCH FOR <TEXT> ?<text> BACKWARD SEARCH FOR <TEXT> n NEXT SEARCH MATCH N PREVIOUS SEARCH MATCH = FILE INFORMATION h HELP q QUIT
DISPLAY FIRST LINES head [OPT] FILE tail [OPT] FILE -n
LAST N LINES -n FIRST N LINES DISPLAY LAST LINES
PRINT LINES MATCHING A PATTERN grep [OPT] PATTERN [FILE...] -c
DISPLAY THE NUMBER OF MATCHED LINES -i IGNORE CASE SENSITIVITY -l DISPLAY THE FILENAMES -n DISPLAY THE LINE NUMBERS -w MATCH WHOLE WORD
WORD COUNT wc [OPT] FILE -l LINE COUNT -c BYTE
COUNT -m CHARACTER COUNT -w WORD COUNT
COMMANDS CTRL-KEY
KILL PROCESS CTRL + C STOP PROCESS CTRL + Z
END OF FILE CTRL + D
REDIRECTION I/O
COMMAND > FILE REDIRECT STDOUT TO A FILE OVERWRITE COMMAND
>> FILE REDIRECT STDIN TO A FILE APPEND COMMAND < FILE
COMMAND1 | COMMAND2 | COMMAND3 REDIRECT THE OUTPUT FROM ONE
COMMAND AS INPUT TO THE NEXT ONE
WILDCARDS
WHAT ARE WILDCARDS?
* ? ANY SINGLE CHARACTER ANY NUMBER OF CHARACTERS
SECURITY SYSTEM AND
PERMISSIONS UNIX sudo [OPT] [USER] COMMAND ALLOWS USERS TO RUN
PROGRAMS WITH THE SECURITY PRIVILEGES OF ANOTHER USER NORMALLY THE ROOT
PERMISSIONS UNIX u u u g g g o o
o user user user group group group others others others r w x r w x r w x 4 2 1 4 2 1 4 2 1 a = all 7
CHANGE PERMISSIONS chmod [OPT] MODE FILE -R RECURSIVELY +rx g-w
777 READ AND EXECUTE FOR ALL DENY WRITE ACESS FOR GROUP READ, WRITE AND EXECUTE FOR ALL
PROCESSES UNIX COMMAND & RUN PROCESS ON BACKGROUND jobs BACKGROUND
OR SUSPENDED PROCESSES kill SIGNAL PROCESS SEND SIGNAL TO A PROCESS killall PROCESS KILL PROCESS BY NAME
top DISPLAY TOP CPU PROCESSES ps REPORTS THE PROCESS STATUS
-e FULL LISTING ALL PROCESSES -f
LEAST LAST BUT NOT
history -c CLEAR LAST COMMANDS USED time COMMAND TIME COMMAND
EXECUTION diff COMPARE FILES LINE BY LINE !* LAST MATCHED COMMAND
WALK A FILE HIERARCHY find PATH [OPT] [EXPRESSION] -name FIND
BY NAME -size FIND BY SIZE -iname CASE INSENSITIVE MODE
?