20 useful commands for Linux intermediate users (1)

Source: Internet
Author: User

You may have discovered that the first article is very useful. This article is an extension of the 20 commands that are useful to novice Linux users. The purpose of the first article is to be prepared for new users. This article is intended for intermediate and senior Linux users. Here you will learn how to perform Custom Search, know the processes in progress and stop the processes, how to use the strong features of Linux, and how to compile C in the system, C ++ and JAVA programs.

21. Command: Find

Search for files in the specified directory, start from the parent directory, and then search for subdirectories.

 
 
  1. root@tecmint:~# find -name *.sh 
  2. ./Desktop/load.sh 
  3. ./Desktop/test.sh 
  4. ./Desktop/shutdown.sh 
  5. ./Binary/firefox/run-mozilla.sh 
  6. ./Downloads/kdewebdev-3.5.8/quanta/scripts/externalpreview.sh 
  7. ./Downloads/kdewebdev-3.5.8/admin/doxygen.sh 
  8. ./Downloads/kdewebdev-3.5.8/admin/cvs.sh 
  9. ./Downloads/kdewebdev-3.5.8/admin/ltmain.sh 
  10. ./Downloads/wheezy-nv-install.sh 

Note: The '-name' option is case sensitive for search. You can use the '-iname' option to ignore case sensitivity during search. * It is a wildcard character that can be used to search for all objects. '. Sh' you can use a file name or a part of the file name to specify the output result)

 
 
  1. root@tecmint:~# find -iname *.SH ( find -iname *.Sh /  find -iname *.sH) 
  2. ./Desktop/load.sh 
  3. ./Desktop/test.sh 
  4. ./Desktop/shutdown.sh 
  5. ./Binary/firefox/run-mozilla.sh 
  6. ./Downloads/kdewebdev-3.5.8/quanta/scripts/externalpreview.sh 
  7. ./Downloads/kdewebdev-3.5.8/admin/doxygen.sh 
  8. ./Downloads/kdewebdev-3.5.8/admin/cvs.sh 
  9. ./Downloads/kdewebdev-3.5.8/admin/ltmain.sh 
  10. ./Downloads/wheezy-nv-install.sh 
  11. root@tecmint:~# find -name *.tar.gz 
  12. /var/www/modules/update/tests/aaa_update_test.tar.gz 
  13. ./var/cache/flashplugin-nonfree/install_flash_player_11_linux.i386.tar.gz 
  14. ./home/server/Downloads/drupal-7.22.tar.gz 
  15. ./home/server/Downloads/smtp-7.x-1.0.tar.gz 
  16. ./home/server/Downloads/noreqnewpass-7.x-1.2.tar.gz 
  17. ./usr/share/gettext/archive.git.tar.gz 
  18. ./usr/share/doc/apg/php.tar.gz 
  19. ./usr/share/doc/festival/examples/speech_pm_1.0.tar.gz 
  20. ./usr/share/doc/argyll/examples/spyder2.tar.gz 
  21. ./usr/share/usb_modeswitch/configPack.tar.gz 

Note: search for all files containing 'tar.gz 'under the root directory and all directories with commands.

For more information about the 'Find 'Command, see 35 find Command Examples in Linux


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.