Showing posts with label linux Basic Commands. Show all posts
Showing posts with label linux Basic Commands. Show all posts

Tuesday, 11 December 2012

Linux Basic Commands


linux Basic Commands


File Handling

1:-mkdir – make directories
    Usage: mkdir [OPTION] DIRECTORY...
    eg. mkdir learn
2:-ls – list directory contents
    Usage: ls [OPTION]... [FILE]...
    eg. ls, ls l,
    ls learn
3:-cd – changes directories
    Usage: cd [DIRECTORY]
    eg. cd prabhat
4:-pwd-print
    name of current working directory
    Usage: pwd
5:-vim – Vi Improved, a programmers text editor
     Usage: vim [OPTION] [file]...
     eg. vim file1.txt
6;-cp – copy files and directories
    Usage: cp [OPTION]... SOURCE DEST
    eg. cp sample.txt sample_copy.txt
     cp sample_copy.txt target_dir
7:- mv – move (rename) files
     Usage: mv [OPTION]... SOURCE DEST
     eg. mv source.txt target_dir
     mv old.txt new.txt
8:-rm remove
    files or directories
    Usage: rm [OPTION]... FILE...
    eg. rm file1.txt , rm rf some_dir
9;- find – search for files in a directory hierarchy
     Usage: find [OPTION] [path] [pattern]
     eg. find file1.txt, find name file1.txt
10:- history – prints recently used commands
       Usage: history

Text Handling/Processing

1:-cat – concatenate files and print on the standard output
    Usage: cat [OPTION] [FILE]...
    eg. cat file1.txt file2.txt
    cat n file1.txt
2:-echo – display a line of text
    Usage: echo [OPTION] [string] ...
    eg. echo I love Pakistan
    echo $HOME
3:-grep print
    lines matching a pattern
    Usage: grep [OPTION] PATTERN [FILE]...
    eg. grep i
    apple sample.txt
4:-wc print
    the number of newlines, words, and bytes in files
    Usage: wc [OPTION]... [FILE]...
    eg. wc file1.txt
    wc L
    file1.txt
5:-sort – sort lines of text files
    Usage: sort [OPTION]... [FILE]...
    eg. sort file1.txt
    sort r
    file1.txt

System Administration

1:-su – change user ID or become superuser
    Usage: su [OPTION] [LOGIN]
    eg. su remo, su
2:-passwd – update a user’s authentication tokens(s)
    Usage: passwd [OPTION]
    eg. passwd
3:-who – show who is logged on
     Usage: who [OPTION]
     eg. who , who b, who q

File Systems

1:-fdisk – partition manipulator
    eg. sudo fdisk l
2:-mount – mount a file system
    Usage: mount t
    type device dir
    eg. mount /dev/sda5 /media/target
3;- umount – unmount file systems
     Usage: umount [OPTIONS] dir | device...
     eg. umount /media/target
4:-du – estimate file space usage
    Usage: du [OPTION]... [FILE]...
    eg. du
5:- df – report filesystem disk space usage
     Usage: df [OPTION]... [FILE]...
     eg. df
6:- quota – display disk usage and limits
     Usage: quota [OPTION]
     eg. quota v