Find and symbolic link modification time


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Find and symbolic link modification time
# 1  
Old 09-26-2010
Find and symbolic link modification time

Hi,

I have a directory made up of many symbolic links to folders multiple file systems.

I want to return folders modified within the last 50 days, but find is using the link time rather than the target time.
Code:
find . -type d -mtime -50

Is there a way to either:
a) Make a symbolic link modification time match its target or
b) Have find reference the target modification time?

Thanks,

Colm
# 2  
Old 09-27-2010
Code:
 -L
            Cause the file information and file type evaluated for each symbolic link to be those of the file referenced by the link, and not the link
            itself.

This User Gave Thanks to thegeek For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Getting files through find command and listing file modification time upto seconds

I have to list the files of particular directory using file filter like find -name abc* something and if multiple file exist I also want time of each file up to seconds. Currently we are getting time up to minutes in AIX is there any way I can get file last modification time up to seconds. (4 Replies)
Discussion started by: Nitesh sahu
4 Replies

2. UNIX for Dummies Questions & Answers

AIX - find also in symbolic link

Hi, i tried to search a string, recursively, in subdirectories with: find . -type f -print | xargs grep -s hello i found all files that contain the string "hello" but i would perform a search also in symbolic link, so i tried with find -L . -print | xargs grep -s hello but no result was... (3 Replies)
Discussion started by: nash83
3 Replies

3. UNIX for Dummies Questions & Answers

[Solved] Symbolic link not allowed or link target not accessible

Hi everybody, I read about treads realted to this issue but they did not resovle issue given below. Please help me resolve issue given below I have html file under /srv/www/htdocs/actual_folder ls actual_folder/ test.html and following link works... (0 Replies)
Discussion started by: newbielgn
0 Replies

4. Shell Programming and Scripting

ls on a symbolic link

Hi all, Can anyone please confirm if the command below is the only way that I can get what the symbolic link is set to? mnlxd110(oracle)/db/posd2/dba$: ls -l | grep "^l" lrwxrwxrwx 1 oracle dba 28 Aug 9 2011 bdump -> diag/rdbms/posp1/posp1/trace mnlxd110(oracle)/db/posd2/dba$:... (7 Replies)
Discussion started by: newbie_01
7 Replies

5. Shell Programming and Scripting

How to list the files based on the modification time using the find command?

Hi All, I need to list the files based modification time of the files from a directory, I cannot use "ls -t" as there are lot of files, which "ls" command cannot handle. New files will land there daily. So iam looking for an alternative through "find"command. All suggestions are welcomed. ... (6 Replies)
Discussion started by: Kesavan
6 Replies

6. UNIX for Dummies Questions & Answers

How to find .dat file in symbolic link

Hi, I am trying to find all files in a directory that have .dat and .int extensions and removing them. rm -f `find ${MY_DIR} -type f -name '*.dat' -o -name '*.int'` This works fine if $MY_DIR is a regular directory. However when $MY_DIR is a symbolic link then this command fails. How... (1 Reply)
Discussion started by: neeto
1 Replies

7. Shell Programming and Scripting

ls -e to find out File modification time in secs

Hi All, I would like to know the file modification time till seconds in Unix. So I tried ls -e and it worked fine. This Solaris 5.10 -rw-rw-r-- 1 test admin 22 Sep 12 11:01:37 2008 test_message But I am not able to run the same command in SOlaris 5.6 and also in AIX/HP Is there... (3 Replies)
Discussion started by: rahulkav
3 Replies

8. Filesystems, Disks and Memory

change created and modification time if symbolic links

Hi, I am trying to duplicate a symbolic link, the new link should be the exact replica of the original one, with same file attributes, permissions, owner, group and even the time. i m successful in changing the owner and group, but when i try to change the time using utime, the time of the... (1 Reply)
Discussion started by: avanigadhai
1 Replies

9. UNIX for Dummies Questions & Answers

need some info about symbolic link and hard link

hello folks how y'all doin well i have some questions about symbolic link and hard link hope some one answer me i open terminal and join as root and i wrote ln -s blah blah then i wrote ls i see red file called blah blah but didn't understand what is this can some one explain and... (2 Replies)
Discussion started by: detective linux
2 Replies

10. UNIX for Dummies Questions & Answers

symbolic Link

question abt symbolic link ... i'm doing the following ... ln -s x.sh ./scripts/y.sh and cat ./scripts/y.sh it is giving following error cat: cannot open y.sh Any reason u an think of ? But it is working fine when i goto scripts directory and cretae the symbolic link. ... (1 Reply)
Discussion started by: bhargav
1 Replies
Login or Register to Ask a Question