Tuesday 24 July 2012

Finding files in linux

Problem: Finding or Searching files in Linux
Solution: In Linux or Unix you can use find command to find files. Find command will search for the files in current working directory and its subdirectories as well.


  1. To find a file named install.log
     
    [root@dragon ~]# find -name install.log
    ./install.log
    
  2.  To find all files that starts with ins (i.e) ins*
     
    [root@dragon ~]# find -name ins\*
    ./install.log
    ./install.log.syslog
    ./vmware-tools-distrib/installer
    ./vmware-tools-distrib/etc/installer.sh
    

No comments:

Post a Comment