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.
how do i remove sub directories of a directory and all files which are older than 7 days by a single command in AIX. pls help me.
I am using command as
#find /gpfs1/home/vinod/hpc/ -depth -type d -mtime +7 -exec rm -rf {} \;
so i want to delete all sub directories and all files from the hpc dir. which are older than 7 days.
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 everyone,
I want to create 4000 directories with names like dir0001 ... dir 0100 till dir4000 and move 100 files in each.
I am using this :
Code:
ls|xargs -n100|awk ' {i++;system("mkdir dir"i);system("mv "$0" -t dir"i)}'
I get the directory names at dir1, dir2 etc.
Hi all,
1). Is is possible to use the date builtin and subtract a literal e.g 1 day in bash alongwith the find command from the command line:
e.g
Code:
find . -name --date %Y-%m-%d - 1
2).
It's one of those days where I think "What if..." and almost break my entire system in the process...Since I couldn't find any specific information about the usage of directories with MIME, I searched around and found the xml for the inode/directory type.<?xml version="1.0" encoding="utf-8"?><mime-type xmlns="http://www.freedesktop.org/standard
I'm running into 2 problems when working with my logs and the find command.
I am having problems with the mtime option. The 1st command below shows me a few files from March 5th till March 7th, like I believe it should. However, when I add +1 to mtime instead of +0, it only does an ls of the current directory I'm in when running the command. It's just listening my directories under /home/user/.
hi everyone
i have a lot of directories in a /pub and i want to find directories that start by "o*" word and change ownership of user and group of directories to that directory .for example i want to change ownership of directory o333 (chown o333:o333 o333).
I want to backup all the directory tress, including hidden directories, without copying any files.
find . -type d gives the perfect list.
When I tried tar, it won't work for me.
Quote:
find .