Hello, I am using ksh93 (/usr/dt/bin/dtksh) on Solaris and am stuck when trying to use find with the -prune option.
I need to search a directory (supplied in a variable) for files matching a certain pattern, but ignore any sub-directories.
I have tried:
Code:
find ${full_path_to_dir_to_search} -type f -name "*.dat" -print -o -type d -prune
which produces no output.
I am wanting to search recursively through a directory and find all files that are not hidden files themselves and are not in a hidden dir. I tried using find .
:)Hi Unix Specialists,
I need your advice on how to find all the files from root ( / ) filesystem but exclude those from /export/home (different filesystem) folder.
I have a large directory of music files that is often changing as files and directories come and go.
Hi,
I have to find specific files only in the current directory...not in the sub directories.
But when I use Find command ... it searches all the files in the current directory as well as in the subdirectories. I am using AIX-UNIX machine.Please help..
I am using the below command. And i am able to list files only in the directory but not in sub-directories.
find . ! -name .
Hi,
I have more than 1000 directories under one directory (lets says under /home/).
Sub directories are like A1 to A100,B1 to B100 etc..
Here my problem is I need to find the files older than 10 days in the directories which starts with A*.
I tried some thing like this which is not working.
Code:
find .
Hi ,
I imported find command I have on my hp-ux server to clean up the /tmp of my new IBM AIX servers.
Though, the commands always fails in the cron but if I past it at the prompt, it works find.
Introduction
If you wan to find files or directories, that were last modified in the last n days or just today, it is really easy to do in Linux.
How to find files last modifies today
Use the find command to do this
find -maxdepth 1 -type f -mtime 1
maxdepth: will tell find to only search in the current folder
type: will tell find to only list files and not directories
mtime: will tell find to on
i feel weird with this 2 command
Code:
find /tmp/*test* -user `whoami` -mtime +1 -type f -exec rm -f {}\;
find /tmp/*test* -user `whoami` -mtime +1 -type f -exec ls -lrt {}\;
the first one return correct which only delete those filename that consist *test* where second command it listed all the files inside the directory which including those filename that not *test*
can someone help to ex