Close Menu
  • Analog Design
    • Latest Analog Layout Interview Questions (2025)
  • Digital Design
    • Digital Electronics Interview Question(2025)
    • Top VLSI Interview Questions
  • Physical Design
    • Physical Design Interview Questions for VLSI Engineers
  • Verilog
    • Verilog Interview Questions(2024)
  • Forum
Facebook Instagram YouTube LinkedIn WhatsApp
SiliconvlsiSiliconvlsi
Forum Questions Register in Forum Login in Forum
Facebook Instagram YouTube LinkedIn WhatsApp
  • Analog Design
    • Latest Analog Layout Interview Questions (2025)
  • Digital Design
    • Digital Electronics Interview Question(2025)
    • Top VLSI Interview Questions
  • Physical Design
    • Physical Design Interview Questions for VLSI Engineers
  • Verilog
    • Verilog Interview Questions(2024)
  • Forum
SiliconvlsiSiliconvlsi
Home»Linux»How To Find a File In Linux Terminal
Linux

How To Find a File In Linux Terminal

siliconvlsiBy siliconvlsiJanuary 19, 2024Updated:January 19, 2024No Comments1 Min Read
Facebook Pinterest LinkedIn Email WhatsApp
Share
Facebook Twitter LinkedIn Pinterest Email

Find Commands

The find command in Linux is a powerful tool for locating files and directories based on various criteria. Here are some typical find commands and their syntax:

How To Find a File In Linux Terminal

Basic Examples

Find a file named thisfile.txt in the current and sub-directories

find . -name thisfile.txt

Find all .siliconvlsi files in the /home directory and its sub-directories

find /home -name "*.siliconvlsi"

Find empty files in the current directory

find . -type f -empty

Find Files by Modification Time in the Linux Terminal

Find files modified in the last 3 days

find / -name "*siliconvlsi" -mtime 3

Find files modified in the last 6 days in a specific user’s home directory

find /home/randomuser/ -name "*siliconvlsi" -mtime 6

Using Grep to Find Files Based on Content

Use grep in conjunction with find to search for files containing a specific content:

find . -type f -exec grep "forinstance" '{}' \; -print

These examples demonstrate the versatility of the find command in Linux for locating files based on various conditions, such as name, type, modification time, and content.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

Related Posts

Delete words after certain word in each line in gvim

January 28, 2024

Linux date Command

January 22, 2024

What is a Linux locate Command?

January 22, 2024
Leave A Reply Cancel Reply

Facebook X (Twitter) Instagram Pinterest Vimeo YouTube
  • About Us
  • Contact Us
  • Privacy Policy
© 2025 Siliconvlsi.

Type above and press Enter to search. Press Esc to cancel.