68
fud con 4-6 November, 2011 PUNE

Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Practical GNU/Linux

Arun S.A.G

FUDCon, Pune

November, 2011

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 1 / 27

Page 2: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Table Of Contents

1 Shell

2 Basic commands

3 Permissions

4 Text editors

5 Search for �les

6 Grep/Egrep

7 Di�

8 SCP

9 Download �lesWgetCURL

10 Redirecting things

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 2 / 27

Page 3: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Introduction To Shell

Extremely Powerful

csh,bash,zsh

Changing your login shell

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 3 / 27

Page 4: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Introduction To Shell

Extremely Powerful

csh,bash,zsh

Changing your login shell

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 3 / 27

Page 5: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Introduction To Shell

Extremely Powerful

csh,bash,zsh

Changing your login shell

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 3 / 27

Page 6: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Table Of Contents

1 Shell

2 Basic commands

3 Permissions

4 Text editors

5 Search for �les

6 Grep/Egrep

7 Di�

8 SCP

9 Download �lesWgetCURL

10 Redirecting things

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 4 / 27

Page 7: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Basic Commands

ls

cd

man

~ and /

. (dot) and .. (dotdot)

tab-completion

command history

Escaping from 'Trap': Ctrl+C, Ctrl+D and Ctrl+Z

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 5 / 27

Page 8: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Basic Commands

ls

cd

man

~ and /

. (dot) and .. (dotdot)

tab-completion

command history

Escaping from 'Trap': Ctrl+C, Ctrl+D and Ctrl+Z

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 5 / 27

Page 9: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Basic Commands

ls

cd

man

~ and /

. (dot) and .. (dotdot)

tab-completion

command history

Escaping from 'Trap': Ctrl+C, Ctrl+D and Ctrl+Z

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 5 / 27

Page 10: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Basic Commands

ls

cd

man

~ and /

. (dot) and .. (dotdot)

tab-completion

command history

Escaping from 'Trap': Ctrl+C, Ctrl+D and Ctrl+Z

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 5 / 27

Page 11: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Basic Commands

ls

cd

man

~ and /

. (dot) and .. (dotdot)

tab-completion

command history

Escaping from 'Trap': Ctrl+C, Ctrl+D and Ctrl+Z

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 5 / 27

Page 12: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Basic Commands

ls

cd

man

~ and /

. (dot) and .. (dotdot)

tab-completion

command history

Escaping from 'Trap': Ctrl+C, Ctrl+D and Ctrl+Z

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 5 / 27

Page 13: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Basic Commands

ls

cd

man

~ and /

. (dot) and .. (dotdot)

tab-completion

command history

Escaping from 'Trap': Ctrl+C, Ctrl+D and Ctrl+Z

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 5 / 27

Page 14: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Basic Commands

ls

cd

man

~ and /

. (dot) and .. (dotdot)

tab-completion

command history

Escaping from 'Trap': Ctrl+C, Ctrl+D and Ctrl+Z

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 5 / 27

Page 15: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Table Of Contents

1 Shell

2 Basic commands

3 Permissions

4 Text editors

5 Search for �les

6 Grep/Egrep

7 Di�

8 SCP

9 Download �lesWgetCURL

10 Redirecting things

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 6 / 27

Page 16: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Permissions in Linux

ls -l - View permissions

chmod - Modify permissions

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 7 / 27

Page 17: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Permissions in Linux

ls -l - View permissions

chmod - Modify permissions

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 7 / 27

Page 18: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Table Of Contents

1 Shell

2 Basic commands

3 Permissions

4 Text editors

5 Search for �les

6 Grep/Egrep

7 Di�

8 SCP

9 Download �lesWgetCURL

10 Redirecting things

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 8 / 27

Page 19: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Real Programmers

Figure: http://xkcd.com/727/

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 9 / 27

Page 20: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Editors

Vim

Emacs

Other editors

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 10 / 27

Page 21: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Editors

Vim

Emacs

Other editors

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 10 / 27

Page 22: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Editors

Vim

Emacs

Other editors

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 10 / 27

Page 23: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Table Of Contents

1 Shell

2 Basic commands

3 Permissions

4 Text editors

5 Search for �les

6 Grep/Egrep

7 Di�

8 SCP

9 Download �lesWgetCURL

10 Redirecting things

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 11 / 27

Page 24: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Finding �les

�nd <path> <command> <name>

�nd . -name "*resume*"

�nd . -perm a=rwx,g=rwx,u=rwx

�nd . -name "*resume*" -exec ls -l \;locate

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 12 / 27

Page 25: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Finding �les

�nd <path> <command> <name>

�nd . -name "*resume*"

�nd . -perm a=rwx,g=rwx,u=rwx

�nd . -name "*resume*" -exec ls -l \;locate

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 12 / 27

Page 26: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Finding �les

�nd <path> <command> <name>

�nd . -name "*resume*"

�nd . -perm a=rwx,g=rwx,u=rwx

�nd . -name "*resume*" -exec ls -l \;locate

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 12 / 27

Page 27: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Finding �les

�nd <path> <command> <name>

�nd . -name "*resume*"

�nd . -perm a=rwx,g=rwx,u=rwx

�nd . -name "*resume*" -exec ls -l \;

locate

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 12 / 27

Page 28: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Finding �les

�nd <path> <command> <name>

�nd . -name "*resume*"

�nd . -perm a=rwx,g=rwx,u=rwx

�nd . -name "*resume*" -exec ls -l \;locate

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 12 / 27

Page 29: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Table Of Contents

1 Shell

2 Basic commands

3 Permissions

4 Text editors

5 Search for �les

6 Grep/Egrep

7 Di�

8 SCP

9 Download �lesWgetCURL

10 Redirecting things

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 13 / 27

Page 30: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Searching in �les

grep <pattern> <�le>

grep "stack" tcp.c

grep "s[nmt]ck" tcp.c

grep "s.ack" tcp.c

grep "[0-9][0-9][0-9][0-9][0-9]" tcp.c

egrep "[0-9]{5}" tcp.c

egrep "hello{3}" tcp.c

egrep "(hello){3}" tcp.c

grep "�int" tcp.c

grep ";$" tcp.c

egrep "�[�0-9]*$" tcp.c

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 14 / 27

Page 31: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Searching in �les

grep <pattern> <�le>

grep "stack" tcp.c

grep "s[nmt]ck" tcp.c

grep "s.ack" tcp.c

grep "[0-9][0-9][0-9][0-9][0-9]" tcp.c

egrep "[0-9]{5}" tcp.c

egrep "hello{3}" tcp.c

egrep "(hello){3}" tcp.c

grep "�int" tcp.c

grep ";$" tcp.c

egrep "�[�0-9]*$" tcp.c

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 14 / 27

Page 32: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Searching in �les

grep <pattern> <�le>

grep "stack" tcp.c

grep "s[nmt]ck" tcp.c

grep "s.ack" tcp.c

grep "[0-9][0-9][0-9][0-9][0-9]" tcp.c

egrep "[0-9]{5}" tcp.c

egrep "hello{3}" tcp.c

egrep "(hello){3}" tcp.c

grep "�int" tcp.c

grep ";$" tcp.c

egrep "�[�0-9]*$" tcp.c

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 14 / 27

Page 33: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Searching in �les

grep <pattern> <�le>

grep "stack" tcp.c

grep "s[nmt]ck" tcp.c

grep "s.ack" tcp.c

grep "[0-9][0-9][0-9][0-9][0-9]" tcp.c

egrep "[0-9]{5}" tcp.c

egrep "hello{3}" tcp.c

egrep "(hello){3}" tcp.c

grep "�int" tcp.c

grep ";$" tcp.c

egrep "�[�0-9]*$" tcp.c

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 14 / 27

Page 34: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Searching in �les

grep <pattern> <�le>

grep "stack" tcp.c

grep "s[nmt]ck" tcp.c

grep "s.ack" tcp.c

grep "[0-9][0-9][0-9][0-9][0-9]" tcp.c

egrep "[0-9]{5}" tcp.c

egrep "hello{3}" tcp.c

egrep "(hello){3}" tcp.c

grep "�int" tcp.c

grep ";$" tcp.c

egrep "�[�0-9]*$" tcp.c

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 14 / 27

Page 35: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Searching in �les

grep <pattern> <�le>

grep "stack" tcp.c

grep "s[nmt]ck" tcp.c

grep "s.ack" tcp.c

grep "[0-9][0-9][0-9][0-9][0-9]" tcp.c

egrep "[0-9]{5}" tcp.c

egrep "hello{3}" tcp.c

egrep "(hello){3}" tcp.c

grep "�int" tcp.c

grep ";$" tcp.c

egrep "�[�0-9]*$" tcp.c

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 14 / 27

Page 36: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Searching in �les

grep <pattern> <�le>

grep "stack" tcp.c

grep "s[nmt]ck" tcp.c

grep "s.ack" tcp.c

grep "[0-9][0-9][0-9][0-9][0-9]" tcp.c

egrep "[0-9]{5}" tcp.c

egrep "hello{3}" tcp.c

egrep "(hello){3}" tcp.c

grep "�int" tcp.c

grep ";$" tcp.c

egrep "�[�0-9]*$" tcp.c

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 14 / 27

Page 37: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Searching in �les

grep <pattern> <�le>

grep "stack" tcp.c

grep "s[nmt]ck" tcp.c

grep "s.ack" tcp.c

grep "[0-9][0-9][0-9][0-9][0-9]" tcp.c

egrep "[0-9]{5}" tcp.c

egrep "hello{3}" tcp.c

egrep "(hello){3}" tcp.c

grep "�int" tcp.c

grep ";$" tcp.c

egrep "�[�0-9]*$" tcp.c

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 14 / 27

Page 38: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Searching in �les

grep <pattern> <�le>

grep "stack" tcp.c

grep "s[nmt]ck" tcp.c

grep "s.ack" tcp.c

grep "[0-9][0-9][0-9][0-9][0-9]" tcp.c

egrep "[0-9]{5}" tcp.c

egrep "hello{3}" tcp.c

egrep "(hello){3}" tcp.c

grep "�int" tcp.c

grep ";$" tcp.c

egrep "�[�0-9]*$" tcp.c

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 14 / 27

Page 39: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Searching in �les

grep <pattern> <�le>

grep "stack" tcp.c

grep "s[nmt]ck" tcp.c

grep "s.ack" tcp.c

grep "[0-9][0-9][0-9][0-9][0-9]" tcp.c

egrep "[0-9]{5}" tcp.c

egrep "hello{3}" tcp.c

egrep "(hello){3}" tcp.c

grep "�int" tcp.c

grep ";$" tcp.c

egrep "�[�0-9]*$" tcp.c

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 14 / 27

Page 40: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Searching in �les

grep <pattern> <�le>

grep "stack" tcp.c

grep "s[nmt]ck" tcp.c

grep "s.ack" tcp.c

grep "[0-9][0-9][0-9][0-9][0-9]" tcp.c

egrep "[0-9]{5}" tcp.c

egrep "hello{3}" tcp.c

egrep "(hello){3}" tcp.c

grep "�int" tcp.c

grep ";$" tcp.c

egrep "�[�0-9]*$" tcp.c

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 14 / 27

Page 41: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Table Of Contents

1 Shell

2 Basic commands

3 Permissions

4 Text editors

5 Search for �les

6 Grep/Egrep

7 Di�

8 SCP

9 Download �lesWgetCURL

10 Redirecting things

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 15 / 27

Page 42: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Compare �les line by line

di� �le1 �le2

di� dir1/ dir2/

di� �le3 �le4 -B

di� �le4 �le5 -b

di� �le1 �le2 -y

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 16 / 27

Page 43: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Compare �les line by line

di� �le1 �le2

di� dir1/ dir2/

di� �le3 �le4 -B

di� �le4 �le5 -b

di� �le1 �le2 -y

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 16 / 27

Page 44: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Compare �les line by line

di� �le1 �le2

di� dir1/ dir2/

di� �le3 �le4 -B

di� �le4 �le5 -b

di� �le1 �le2 -y

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 16 / 27

Page 45: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Compare �les line by line

di� �le1 �le2

di� dir1/ dir2/

di� �le3 �le4 -B

di� �le4 �le5 -b

di� �le1 �le2 -y

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 16 / 27

Page 46: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Compare �les line by line

di� �le1 �le2

di� dir1/ dir2/

di� �le3 �le4 -B

di� �le4 �le5 -b

di� �le1 �le2 -y

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 16 / 27

Page 47: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Table Of Contents

1 Shell

2 Basic commands

3 Permissions

4 Text editors

5 Search for �les

6 Grep/Egrep

7 Di�

8 SCP

9 Download �lesWgetCURL

10 Redirecting things

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 17 / 27

Page 48: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Secure copy - Remote copy program

scp [user1@host1:]�le1 [user2@host2:]�le2

scp [email protected]:public_html/misc/sysfs_screenshot.png~/Desktop

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 18 / 27

Page 49: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Secure copy - Remote copy program

scp [user1@host1:]�le1 [user2@host2:]�le2

scp [email protected]:public_html/misc/sysfs_screenshot.png~/Desktop

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 18 / 27

Page 50: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Table Of Contents

1 Shell

2 Basic commands

3 Permissions

4 Text editors

5 Search for �les

6 Grep/Egrep

7 Di�

8 SCP

9 Download �lesWgetCURL

10 Redirecting things

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 19 / 27

Page 51: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Table Of Contents

1 Shell

2 Basic commands

3 Permissions

4 Text editors

5 Search for �les

6 Grep/Egrep

7 Di�

8 SCP

9 Download �lesWgetCURL

10 Redirecting things

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 20 / 27

Page 52: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Wget - Network Downloader

wget <URL>

wget -c http://sagarun.fedorapeople.org/misc/fedora-live-base.ks

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 21 / 27

Page 53: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Wget - Network Downloader

wget <URL>

wget -c http://sagarun.fedorapeople.org/misc/fedora-live-base.ks

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 21 / 27

Page 54: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Table Of Contents

1 Shell

2 Basic commands

3 Permissions

4 Text editors

5 Search for �les

6 Grep/Egrep

7 Di�

8 SCP

9 Download �lesWgetCURL

10 Redirecting things

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 22 / 27

Page 55: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

CURL - transfer a URL

curl <URL>

curl http://www.google.com/

curl -L http://www.google.com/

curl -O http://www.google.co.in/index.html

curl -I http://yahoo.com/

curl http://icanhazip.com/

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 23 / 27

Page 56: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

CURL - transfer a URL

curl <URL>

curl http://www.google.com/

curl -L http://www.google.com/

curl -O http://www.google.co.in/index.html

curl -I http://yahoo.com/

curl http://icanhazip.com/

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 23 / 27

Page 57: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

CURL - transfer a URL

curl <URL>

curl http://www.google.com/

curl -L http://www.google.com/

curl -O http://www.google.co.in/index.html

curl -I http://yahoo.com/

curl http://icanhazip.com/

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 23 / 27

Page 58: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

CURL - transfer a URL

curl <URL>

curl http://www.google.com/

curl -L http://www.google.com/

curl -O http://www.google.co.in/index.html

curl -I http://yahoo.com/

curl http://icanhazip.com/

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 23 / 27

Page 59: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

CURL - transfer a URL

curl <URL>

curl http://www.google.com/

curl -L http://www.google.com/

curl -O http://www.google.co.in/index.html

curl -I http://yahoo.com/

curl http://icanhazip.com/

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 23 / 27

Page 60: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

CURL - transfer a URL

curl <URL>

curl http://www.google.com/

curl -L http://www.google.com/

curl -O http://www.google.co.in/index.html

curl -I http://yahoo.com/

curl http://icanhazip.com/

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 23 / 27

Page 61: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Table Of Contents

1 Shell

2 Basic commands

3 Permissions

4 Text editors

5 Search for �les

6 Grep/Egrep

7 Di�

8 SCP

9 Download �lesWgetCURL

10 Redirecting things

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 24 / 27

Page 62: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Input/Error/Output Redirection

cat /etc/passwd | grep zer0c00l

cat /etc/passwd > temppasswd

cat /etc/passwd � temppasswd

lsl

lsl 2> /dev/null

./conversation.py < name

ping google.com | tee ping

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 25 / 27

Page 63: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Input/Error/Output Redirection

cat /etc/passwd | grep zer0c00l

cat /etc/passwd > temppasswd

cat /etc/passwd � temppasswd

lsl

lsl 2> /dev/null

./conversation.py < name

ping google.com | tee ping

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 25 / 27

Page 64: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Input/Error/Output Redirection

cat /etc/passwd | grep zer0c00l

cat /etc/passwd > temppasswd

cat /etc/passwd � temppasswd

lsl

lsl 2> /dev/null

./conversation.py < name

ping google.com | tee ping

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 25 / 27

Page 65: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Input/Error/Output Redirection

cat /etc/passwd | grep zer0c00l

cat /etc/passwd > temppasswd

cat /etc/passwd � temppasswd

lsl

lsl 2> /dev/null

./conversation.py < name

ping google.com | tee ping

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 25 / 27

Page 66: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Input/Error/Output Redirection

cat /etc/passwd | grep zer0c00l

cat /etc/passwd > temppasswd

cat /etc/passwd � temppasswd

lsl

lsl 2> /dev/null

./conversation.py < name

ping google.com | tee ping

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 25 / 27

Page 67: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Input/Error/Output Redirection

cat /etc/passwd | grep zer0c00l

cat /etc/passwd > temppasswd

cat /etc/passwd � temppasswd

lsl

lsl 2> /dev/null

./conversation.py < name

ping google.com | tee ping

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 25 / 27

Page 68: Practical GNU/Linuxsagarun.fedorapeople.org/talks/Practical_Linux_0.pdf · Practical GNU/Linux Arun S.A.G FUDCon, Pune November, 2011 Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux

fud con4-6 November, 2011

PUNE

Input/Error/Output Redirection

cat /etc/passwd | grep zer0c00l

cat /etc/passwd > temppasswd

cat /etc/passwd � temppasswd

lsl

lsl 2> /dev/null

./conversation.py < name

ping google.com | tee ping

Arun S.A.G (FUDCon, Pune) Intro to GNU/Linux Command Line November, 2011 25 / 27