Search file in unix




















To find all. To find all the files which are modified more than 50 days back and less than days. To find all the files which are greater than 50MB and less than MB. Find all. These are some most important examples of Find command in Unix. I hope you like this article on Find command in Unix. If you like this article on Find command in Unix or If you have any suggestions kindly comment in to comment Section.

Options Help Chat with a consultant. Include archived documents. Use the Unix find command to search for files To use the find command, at the Unix prompt, enter: find. Options The general form of the command is: find starting directory matching criteria and actions The find command will begin looking in the starting directory you specify and proceed to search through all accessible subdirectories.

You have several options for matching criteria: -atime n File was accessed n days ago -mtime n File was modified n days ago -size n File is n blocks big a block is bytes. On other systems, a trailing slash does not affect the command. Eduonix Learning Solutions. Frahaan Hussain. Pradeep D. Musab Zayadneh. Previous Page. Next Page. Asked 6 years, 7 months ago.

Active 6 years, 7 months ago. Viewed 42k times. Improve this question. Community Bot 1 1 1 silver badge. Add a comment. Active Oldest Votes. Explanation find -type f this finds files in the given directory structure. Also, grep -l L returns the file name, not the match itself.

Improve this answer. Thank you, How can I just see the file names instead the contents of the matching line also. For that, use grep -l L — fedorqui 'SO stop harming'.



0コメント

  • 1000 / 1000