Linux: Search for a file – here’s how

by Pramith

If you are looking for a file under Linux, you will find it via your Linux terminal

Finding a file via the Linux terminal

Open your Linux terminal with the key combination [Ctrl] + [Alt] + [T] or enter the term “Terminal” in the search.

  • If you are looking for a folder in Linux, the command “find / -name folder name” will help you.
  • Suppose you are looking for the “Office” folder, so enter “find / -name Office” in the terminal. You will receive the path that leads to the folder you are looking for
  • The “/” after “find” and before “-name” indicates that the folder should be searched for everywhere.
  • You can also search in a specific directory. Then enter the starting point for the search – for example in the “Work” directory as follows: find /Work / -name Office “

How to search for a special file in Linux

If you are looking for a single file rather than a folder, you can find out more in this section.

  • Type “find / -iname DateiName” into the console. For example, if you are looking for the file “Reimi.txt”, the command is “find / -iname Reime.txt”.
  • The file extension is important – otherwise the terminal will not return any hits.
  • The file names must not contain spaces; you would not get any results here either.

Related Articles

Leave a Comment