![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to find a file named vijay in a directory using find command | amirthraj_12 | UNIX for Dummies Questions & Answers | 6 | 10-25-2008 09:37 AM |
| Help Required: Command to find IP address and command executed of a user | loggedout | Security | 2 | 08-06-2008 05:12 PM |
| Little bit weired : Find files in UNIX w/o using find or where command | jatin.jain | Shell Programming and Scripting | 10 | 09-19-2007 03:47 AM |
| command find returned bash: /usr/bin/find: Argument list too long | yacsil | Shell Programming and Scripting | 1 | 12-15-2003 03:38 PM |
| how to find a file in UNIX without find command? | bluo | Shell Programming and Scripting | 3 | 09-24-2003 08:47 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help with Find command
I have some files and directories in a folder.
I would like to search only the files and not look within the directory or subdirectory. how can i do that using find command. Thank you |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Why do you need find command for that.
You can do it with "ls" command. |
|
#3
|
|||
|
|||
|
the idea is to find only the files and then move it to some specific location.
The logic is already in place which uses find command to do it, now i want to restrict it for looking into directories. |
|
#4
|
|||
|
|||
|
Quote:
Try following command... Find . "filename" type -f -name -print this command will find all the files in the present location/directory, so you can first move to desired location and then hit the above command to get the files. Otherwise you can use like : "/clocal/yourlocation/directory" Thanks. |
|
#5
|
|||
|
|||
|
What do you do about links then?
|
|
#6
|
|||
|
|||
|
Hi,
I already do something like this when searching for a particular file. find * -prune ! -type d -name 'filename' | xargs -I{} mv {} $target_dir * tells find to look at everything in the current directory.The output is then passed to xargs to actually move the files |
|||
| Google The UNIX and Linux Forums |