Your SlideShare is downloading. ×
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Linux Commands
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Linux Commands

2,287

Published on

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,287
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
121
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Linux User Group @ SJSU Linux Commands (Find PocMan on lug-sjsu.org)
  • 2. Linux User Group at San Jose State University BASH – Bourne Again Shell
    • What is a Shell?
    • Customizing the environment
    • - Local and Environment variables
    • HOME, SHELL, PS1
    • PATH, LD_LIBRARY_PATH
    • - Aliases
    • alias ll=‘ls –l’
    • - Command history
    • history, !!, !#
    • - Initialization Scripts
    • .bashrc file
  • 3. Linux User Group at San Jose State University BASH contd.
    • Redirecting
      • standard input <
      • standard output >
      • standard error 2>
    • Pipes |
    • Command Substitution ``
    • Wild-Cards
      • * ? [ijk] [!ijk] [x-z]
  • 4. Linux User Group at San Jose State University Basic File System commands
    • cd – Changing the current directory
    • ls – Listing directory contents
    • mkdir – Making directories
    • rmdir – Removing directories
    • pwd – Checking current directory
  • 5. Linux User Group at San Jose State University Basic File commands
    • cat – Displaying file contents
    • cp – Copying a file
    • mv – Renaming files
    • rm – Removing files
    • file – Knowing the file types
    • Soft and Hard links
  • 6. Linux User Group at San Jose State University Backing up files
    • gzip - Compressing Files
    • gunzip - Decompressing Files
    • tar – Archival program
  • 7. Linux User Group at San Jose State University Basic File Attributes
    • Listing file attributes `ls -l`
    • File Ownership
    • File Permissions
    • Directory Permissions
    • chmod – Changing File ownership
  • 8. Linux User Group at San Jose State University The Process
    • Basics process commands
    • ps, pstree, top
    • Process states
    • ‘ ctrl z’ – suspend a process
    • ‘ ctrl c’ - kill a process
    • Runnning Jobs in Background
    • '&' , bg, fg
    • kill - Killing Processes with Signals
  • 9. Linux User Group at San Jose State University Networking commands/tools
    • Checking the network
    • ping, traceroute, ifconfig, netstat
    • DNS
    • host, nslookup, dig
    • Remote Login
    • telnet, ssh
  • 10. Linux User Group at San Jose State University Miscellaneous commands
    • man & info
    • who, whoami
    • touch
    • finger, finger <username>
    • whereis, which
    • df, du
    • shutdown
  • 11. Vi
    • vi filename [count][command]
    • (count repeats the effect of the command)
    • Vi starts in command mode. The positioning commands operate only while vi is in command mode. You switch vi to input mode by entering any one of several vi input commands. Once in input mode, any character you type is taken to be text and is added to the file. You cannot execute any commands until you exit input mode. To exit input mode, press the escape ( Esc ) key.
    Linux User Group at San Jose State University
  • 12. grep
    • What Is grep?
    • Grep is a tool that originated from the UNIX world during the 1970's. It can search through files and folders (directories in UNIX) and check which lines in those files match a given regular expression. Grep will output the filenames and the line numbers or the actual lines that matched the regular expression. All in all a very useful tool for locating information stored anywhere on your computer, even (or especially) if you do not really know where to look.
  • 13. grep contd..
    • grep -i – ignores case
    • grep -A Num– prints Num lines after context
    • grep -B Num– prints Num lines before context
    • grep -C Num – prints Num lines around context
  • 14. Grep contd..
    • grep -c – returns count of matching lines
    • grep -H – return filenames in which match is found.
    • grep -d type – searching in directories. Where type can be one of the following
      • skip (skip directories specified)
      • recurse (iterate into directories search each file in the directory)
      • read (read directories)
  • 15. Grep contd..
    • Regular Expressions
      • [ ] - range of characters
      • * - matches zero or more times
      • + - matches one or more times
      • ^ - beginning of line
      • $ - end of line
      • ? - match is optional and matches at most once
      • {n} – matches n occurrence
  • 16. Cut
    • To extract information from section from each line of input (usually files)
    • Extraction can be done based on
    • -b – bytes
    • -c – characters
    • -f – fields
    • -d – delimiter (default is tab)
  • 17. Cut contd..
    • A range must be provided in order to extract informations.
    • -N – to end of line
    • -M – from beginning of line till M
    • Usually N and M are counted from 1 (not 0). If we specify 0, latest version errors out but previous versions assumes it to be 1.
  • 18. 03/09/10 Linux User Group at San Jose State University By Rohit Surve and Harish Krishnan

×