Unix Basic Commands III

In Vlsi Industries an engineer must be strong in the Digital Design, Analog Design and he/she should be strong in scripting language, shell commands. Few basic shell commnads which are widely used

  • cat <file_name>——-display the information in a file without opening the file
  • grep ————to search a word in that file
    syntax: grep [options] pattern [files]
    options Decsriptions
    c: This prints only a count of the lines that match a pattern
    -h: Display the matched lines, but do not display the filenames
    -i: Display the matched lines, but do not display the filenames
    -l: Displays list of a filenames only
    -n: Display the matched lines and their line numbers
    -v: This prints out all the lines that do not matches the pattern
    -e exp: Specifies expression with this option. Can use multiple times
    -f file: Takes patterns from file, one per line
    -E: Treats pattern as an extended regular expression
    -w: Match whole word
    -o: Print only the matched parts of a matching line, with each such part on a separate output line
  • mv –——– this is commad which is used to rename or move the file/directory
  • cp –rf <soucre> <destination>————copy the file or directory to some other place
  • cat filename > filename1 copies the information from filename to filename1
  • pwd — gives full path of the present location
  • wc –word count
  • head –<no of lines to disply from top> <file_name> ——-gives the information of lines from top of the file
  • tail -<no of lines to diplay from bottom> <file_name>——-gives the informations of lines from bottom of the file
  • pipeline |  —–out put from the command on left of pipeline will be the input for the command on right of pipeline
    ex: ls | tee file.txt
    ls list the file/directory in the folder and then this will be the input to next command and the tee will  store the information in file.txt

Comments