![]() So, let’s go ahead and look at some examples. The find command is a powerful tool that allows us to quickly and easily scan through our file system to find files and directories that meet certain criteria and we can even perform actions on those results that we get back. ”find” command is more or less last resort helper and rescuer and it has truly no replacement.In this guide, we’ll be learning how to use the find command from within a Linux terminal. Rather I would have 1st option to Catfish as it is really easy but at the same time it is not powerful as per the “ find” command and it would be wrong to say that any app could replace the “find” command completely. Well! Overall I was impressed by “find” command, but it is not so easy and fast. I accept system-wide search would have taken much time but I am sure it would less than 50 sec. It took approx 50 sec to find that song.Ĭatfish was rather easy in search of location, type and other things to enter. Here are the two screenshots of my own searches with this more or less awesome “find” command in my Linux Mint 18.1 including catfish.Ībove I searched for my song system-wide rather than typing whole messy location. Although gnome-search tool is slow, which I didn’t like but it’s better than using that command line interface every time. Also, there are certain apps that can be installed in your Linux OS for search facilities like gnome-search tool, Catfish also gets the job done easily. The options for rescue are also here if you don’t want to mess with the “find” command.I found that the built-in search function also performs decently if you just want to search some file with the specific name. But is find command really simple for a newbie or a user that has encountered for the first time with them? The answer is NO.Īlso Read – How To Find Large Files Using Command Line In Linux Arguments There are still many commands that are really useful and helpful. Note:- The delete command should be used after the name of the file not first. type f -perm 0664 Here are some commands that can be used to find files on certain criteria – $find /home abc.mp3 1 File modified 10 days ago -mtime 10 2 File accessed 10 days ago -atime 10 3 File belonging to certain user -user Jay 4 File changed in last hour -cmin -60 5 File based on size like 10mb -size 10m 6 File modified between 10-20 days ago -mtime 50 -mtime -100 7 File between 10mb-20mb -size 50m -size -100m 8 Delete certain file -exec rm -f \ 9 Find hidden file -type f You can change the perm 0664 with any permission you want. Find the file with certain permission isn’t also difficult with find command. $ find /music -maxdepth 2 -name abc.mp3ħ. Just add “maxdepth 2”. You can replace “2” with any number of directories. So, we can limit the depth of the search by this command. When the find option is used it travels down in all subdirectories available which consume our time. Searching for a file, but doesn’t remember the case? Then here is the command to search the file ignoring the case. Let’s assume you want to know all the specific format files, then this will be useful. ![]() Ok! Let’s search for a specific file under a specific directory. ![]() Here “.” is used for the current directory.Ģ. This command will list out all files under a certain directory. print “.print” is used for older UNIX systems. This command will list out all the files in present directory even including its subdirectories. It all depends on just simple words with this one powerful command “Find”. ![]() You can search for the file that you accessed today or months ago. You can search for the file modified minutes ago or days ago. The Command ” find” is use in Linux to search for files having certain name, date, time or whatever criteria you apply to it. Today you will learn about the famous Linux find Command. Ever wondered how are you going to find it? Yeah! I assume you might say about the search function in nautilus, pacman, or any other file manager you use, but what if you are not allowed to use it! Your file manager just freezes while searching for lots of files. We all need time to find a file that was taken on a specific date, time, or name.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |