that didnt work. let me try and re-explain what i need to do. i have an images folder that has sub folders inside it with over 300000 images. i need the ability to search inside that folder for specfic things like roses, pokemon, racing ect.
OK then , I've created this directory tree:
3 folders, named images01,images02,images03
They contain files with names like pokemon.jpg,racing.jpg,roses.jpg
One of the filenames is ,for example pokemon01-a.jpg
this is a list of where the files are located
Now imagine , for your case that my 'findtest' directory is your 'images' folder.
This folder, has three sub folders (images01,images02,images03). I believe from the list I've given above, it is fairly obvious where each file is located.
Now from the 'prompt' , I'll change into my images folder (mine is called,as i've said 'findtest', using the cd command. Then I'll execute the find command. I'll play with grep as well to see if the output that is returned makes it easier for you.
So, scenario is I'm in my home folder and I'm begining....
This means that from where I am (/export/home/michnmi/Documents/Scripts/Unix.comForum/findtest) the 'relative' location of the files that contain the word pokemon in their filename is this one:
pokemon01-a.jpg is under folder 'images01' which is a subfolder of the folder we are in at the moment we ran the
command (the '.' is important) and pokemon121-kl.jpg is under images02 folder which is...etc
ty for being patient with me. i am enclosing what the folders look like say i am looking for apple i need it to search all of images folder because they may be in other subfolders other than ap.
We know you want to search in all folders inside something. That's what find does. It searches and shows everything inside the folder you wanted. find . by itself would print every directory and file it finds, starting in the current directory and working up. By adding more restrictions to find, you narrow down what it finds into what you want.
I think just -name by itself may have been too restrictive -- I doubt you have any files named just 'name'. -name 'name' wouldn't even find 'name.jpg'.
How about find /path/to/images -iname '*rose*', that should find more. -iname is better than -name because it's case insensitive. Linux filenames are case sensitive, unlike Windows ones.
Last edited by Corona688; 06-03-2011 at 04:18 PM..
Hello,
I am on a Mac and trying to clean up some monthly files with a very simple SED:
sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt
(from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file)
then output to output.txt
Even when I try... (2 Replies)
I just started a new semester and I started my UNIX class yesterday. I've already decided to use python along with my learning process but what I really want to use with it is Kali as my UNIX/Linux platform to learn off of since I already wanted to learn Cyber Sec. anyways. I just wanted to know if... (12 Replies)