Saturday, October 17, 2015

Linux All Command

   Linux Commands – Red Hat  

  •                                  General Commands 

  • dir                             ls directory or dir*

  • ls –l                            Directory listing with long filenames

  • dir /ad                       owner, and permissions
  •  
  •  ls –ld                        Show only the directories matching the search 

  •  ls – R                        Show subdirectories also ( just like dir /s ) 

  •  ls –Sharl                   sort by size, all files, including hidden 

  •  ls –lart                       sort by date, reverse order (newest @ the bottom of list) 
  •                                    -S  - sorts by size, largest first 
  •                                    -r   - reverses any sort command, i.e. ls –rS sorts smallest first 
  •                                    -t   - sorts by modification time, recent first 
  •                                    -u  - sort by last accessed time 
  •                                    -x  - sort by file extension

  • del                               delete

  •  rm –i                          (without the –i, rm will not ask for confirmation) 

  • deltree                              rm –rf * 

  • copy                                cp –i  (without the –i, cp will not prompt for destructive actions\
  •                                    replacement - if the file exists, it is overwritten) 

  •           

  •                                    mount /dev/cdrom /mnt/cdrom 
  •                                    mkdir /root/snortinstall 
  •                                     cp –r -v /mnt/cdrom/* /root/snortinstall 
  •                                     cd /root/snortinstall 
  •                                     chmod –R +wr /root/snortinstall/* 
  •                                    umount /mnt/cdrom 

  •                                                                                                                      1 



No comments:

Post a Comment