06-18-2012
But the find command does not know the path to the given file for newer option...
explaining why it works when in current directory...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is there a way to use the find command to locate files newer than a specific date?
Thanks!
--Alex (4 Replies)
Discussion started by: vertigo23
4 Replies
2. Shell Programming and Scripting
Hi,
I would like to find if a file called test.log is older than 10 min.
So i wrote :
#!/usr/bin/ksh
FICLOG="/home/uuu/result_test.log"
FIC="/home/uuu/test.log"
touch -t `perl -e 'use POSIX qw(strftime); printf("%s\n",strftime("%m%d%H%M",localtime(time-3600*0.17)));'`... (3 Replies)
Discussion started by: dbfree
3 Replies
3. UNIX for Dummies Questions & Answers
What is the command to find the path of a file if we know the file name and the root directory where the file resides..
For eg. if a file abc.dat resides in /home/mydir/myfiles/. I am looking for a command which will be fired from / directory, takes abc.dat as input and display the path of... (3 Replies)
Discussion started by: abhilashnair
3 Replies
4. UNIX for Dummies Questions & Answers
I'm trying to autogenerate a PATH variable from the output of a find command as follows:
PATH=`find $dir -name "*.jar" | sed 's/$/:/'`
The output looks similar like this if I echo it:
PATH=/path/to/1.jar:
/path/to/2.jar:
/path/to/3.jar:
I want the path to be on one line.
I'm on... (3 Replies)
Discussion started by: rein
3 Replies
5. UNIX for Advanced & Expert Users
I am running SUSE/8 and SUSE/9 on a high end server (4 CPU, 8G RAM etc)
I have a huge directory structure with over 4million files in it. I have find the files that are modified (created, modified, renamed etc etc) in the last 10 minutes periodically.
I have tried "find -cmin -10" and "find... (2 Replies)
Discussion started by: xxxyyyy
2 Replies
6. Shell Programming and Scripting
I am writing a script that looks in a reports directory, copies a specified script to a working folder, copies some data files into the working folder, runs the report, zips the new files, then uploads them.
Right now to determine what files to zip (as I don't know how many report files there... (6 Replies)
Discussion started by: droppedonjapan
6 Replies
7. UNIX for Dummies Questions & Answers
i understand by using the pwd command we get the present working directory.
which command is used to find absolute path from home directory to root..
What is absolute path to your and root user's home directory.:confused::confused::confused: (2 Replies)
Discussion started by: shaziafathima
2 Replies
8. UNIX for Dummies Questions & Answers
We had an arrant rsync run and started copying over new files from one system to another.
Although this is what we will want to do at some point, for now, we want to maintain the system as it was a few days ago.
I am looking for a script that will find files that are newer than x days.
... (5 Replies)
Discussion started by: Leyva62
5 Replies
9. UNIX for Dummies Questions & Answers
I'm searching for particular scripts that contain pattern "BASIS" so I used the following command:
find . -type f -print | xargs grep "BASIS"
or
find . -type f -exec grep "BASIS" {} \;
However, I found out that the find command in the UNIX box that I'm working on doesn't find files... (6 Replies)
Discussion started by: The Gamemaster
6 Replies
10. Red Hat
Hi guys. I want to know the path of a command. I tried "which" command also . But no luck.
Please tell me how to find and update the correct path of the command.
Here I'm unable to find the path of ext2online command
# resize2fs /dev/vg01/lvora_backup
resize2fs 1.39 (29-May-2006)... (3 Replies)
Discussion started by: vamshigvk475
3 Replies
LEARN ABOUT HPUX
pathfind
pathfind(3G) pathfind(3G)
NAME
pathfind() - search for named file in named directories
SYNOPSIS
DESCRIPTION
searches the directories named in path for the file name. The directories named in path are separated by colons. mode is a string of
option letters chosen from the set
Letter Meaning
---------------------------
r readable
w writable
x executable
f normal file
b block special
c character special
d directory
p FIFO (pipe)
u set user ID bit
g set group ID bit
k sticky bit
s size nonzero
Options read, write, and execute are checked relative to the real (not the effective) user ID and group ID of the current process.
If the file name, with all the characteristics specified by mode, is found in any of the directories specified by path, then returns a
pointer to a string containing the member of path, followed by a slash character followed by name.
If name begins with a slash, it is treated as an absolute path name, and path is ignored.
An empty path member is treated as the current directory. is not prepended at the occurrence of the first match; rather, the unadorned
name is returned.
To use this interface, link in the libgen library by specifying For example:
RETURN VALUE
If no match is found, returns a null pointer,
EXAMPLES
To find the command using the environment variable:
WARNINGS
The string pointed to by the returned pointer is stored in a static area that is reused on subsequent calls to
SEE ALSO
sh(1), test(1), access(2), mknod(2), stat(2), getenv(3C), thread_safety(5).
pathfind(3G)