It will find all the files within the local file system, which are more than 3000 MB, but lesser than 6000 MB. You will hardly need to find files in other units! Here the file size can be in multiple units, where If you want to find files above or below a certain size, here is the format for that.įormat: find / -size (Used to find files above the given size)įind / -size (Used to find files below the given size) You don’t need to be exact, as you can even search for files, which is within a range. You can even search for files, which are having a particular size. It will not result in any change of the output.Īnother option is available, just like searching for Linux and Windows. You can also keep the name section first, and the type section after that. This will start searching for all the files with the extension ‘.txt’, within your local file system.
You might be searching for a file or directory, of a certain format, and in that case, you should combine ‘ type’ and ‘ name’ together. This file will show the list of all the files, within the local file system.īut that is definitely not something, which you want. If you are using Linux on a computer, the first two will be enough for you. There is just a small command, which you should remember, just like the way, you search for files, with a name. You can find files, normal files, directories, and symbolic links, with Linux. Don’t worry, Linux has a solution for you, as well! Now, you might be stuck with searching for a file, with the certain file type, but don’t know the name of the file. Type -Linux Command for Finding files or directories Just use ‘ -iname’, instead of ‘-name’, and the Linux will start searching for the files, ignoring the case.įiles with the name textfile1.txt will be searched, and the characters within the filename can be either in uppercase or lowercase.
#Linux command how to find corrupted files windows#
But, if you are a Windows user, the difference is that, in Linux, the name of the files are case sensitive, and if you use ‘-name’ to find the files, the case should match.īut what to do, if I don’t remember, whether the filename was in the upper case or lower case! Linux also has a solution for you. This command will start searching for the file with the name ‘ textfile1.txt’, on the complete local file system. Let’s first try to use the ‘ find’ command to search for files, with a certain name, and for that, you will have to use the following Linux command. Let’s not find out how to use the ‘ find’ command for searching files and directories on Linux.Ĭombining all Linux Search Commands to Find Filesįinding files with name in Linux Terminal In case of command line searching, as well, you can assign the number of characters in the filename, the format of the file, the size of the file, and a plethora of other options, to make the process of searching, a charm for you. If you are a Windows user, and also search for files on Linux GUI, you can set certain criteria at the time of searching for the files and directories, to make the process of searching, a lot easier, and efficient. But, using the command is not as easy as the name, and you must remember of the format, or the command, or more importantly, the syntax of the command, to ditch GUI, when you are going to search for your files and directories. The command to search for files and directories on Linux is ‘ Find’. But how! Just like other tasks, you just need to know the command, and the format to search for the files on your computer. Yes, you can search like a pro, with the help of the Linux Terminal.
Searching for files, on GUI is not a big deal, but what about searching files, when you are working on the Terminal, or command line or Linux! There is no doubt, most of the essential tasks on Linux, can easily be carried out with the help of the command line or Terminal on Linux, and searching for a file or directory, is not an exception to that. While working with Linux, there is always a way to find out your files, lest you forget, where you kept them last time.