Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Issue with find command using links Post 81317 by win_vin on Thursday 18th of August 2005 08:52:25 AM
Old 08-18-2005
Issue with find command using links

Hi,
Having a simple issue with find command on Sun. The command works fine if the variable is set to the actual filesystem but fails when the variable is set to a link which is pointing to the same filesystem.


export DUMPDEST=/oradata1/exports/pbm - Set the variable

oracle@gbo6020d:[PBM]:/home/oracle> find ${DUMPDEST} -name "${ORACLE_SID}*FULL*" -mtime +2 -exec ls -l {} \;
-rw-r--r-- 1 oracle dba 398239993 Aug 15 01:24 /oradata1/exports/pbm/PBM_15Aug05_FULL_3.dmp.Z
-rw-r--r-- 1 oracle dba 367997548 Aug 15 01:09 /oradata1/exports/pbm/PBM_15Aug05_FULL_1.dmp.Z
-rw-r--r-- 1 oracle dba 306083283 Aug 15 01:17 /oradata1/exports/pbm/PBM_15Aug05_FULL_2.dmp.Z

export DUMPDEST=/u01/app/oracle/admin/PBM/exports - Set the path with the value as link.

oracle@gbo6020d:[PBM]:/u01/app/oracle/admin/PBM> find ${DUMPDEST} -name "${ORACLE_SID}*FULL*" -mtime +2 -exec ls -l {} \;
oracle@gbo6020d:[PBM]:/u01/app/oracle/admin/PBM>

oracle@gbo6020d:[PBM]:/u01/app/oracle/admin/PBM> pwd
/u01/app/oracle/admin/PBM
oracle@gbo6020d:[PBM]:/u01/app/oracle/admin/PBM> ls -l
total 176
lrwxrwxrwx 1 oracle dba 21 Dec 13 2004 exports -> /oradata1/exports/pbm

It sounds like a small problem or is it a bug ?
Any help will be appreciated.
Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

An issue with find command.

Hi all, I have a shell script(ksh) which has the code as follows. ------------------ cd $mydir for i in `find ./ -type f -mtime +$k` do echo $i done ----------------------- And in $mydir , i have some files which have space in theie names like "Case att15". The out put of the... (6 Replies)
Discussion started by: rajugp1
6 Replies

2. UNIX for Dummies Questions & Answers

Extrange Find command Issue

Hi all, i'm new at shell scripting world... I'm working on a script for searching old files on a server, this scripts runs with a configuration file wich indicates where to search the files, the script should search for all files that are older than an x qty of days, and the only clue that i have... (9 Replies)
Discussion started by: juanklavera
9 Replies

3. UNIX for Dummies Questions & Answers

Command to find all soft links in a directory

I need the command to find all soft links in a directory. Can someone please help. Thank you. (2 Replies)
Discussion started by: jgeo01
2 Replies

4. UNIX for Dummies Questions & Answers

Find command issue

I am currently using below command to get the 1st three characters of a file(PDM). Issue is, when i use find command in root dir, it finds all the files in sub dir also. How to limit the find command search to a given path only(ie: say only find file in apps/cmplus/datamigration/data path... (3 Replies)
Discussion started by: abhi_n123
3 Replies

5. Shell Programming and Scripting

Issue with Find Command

Hi All, I'm a bit new to Linux environment, moderately okay when it comes to Unix AIX. I'm facing an issue while trying to run a simple find command: $ for file in `find . -name *.*` > do > ls $file > done This is throwing the following error: Strangely, a few minutes... (4 Replies)
Discussion started by: adi_2_chaos
4 Replies

6. Linux

find command issue

Hi, I am not root user. I am trying to find the file which has contains pattern "fvsfile" in root directory. If i run the find cmd then i got permission denied and all the files are listed include pattern files. i cant get file name yet find . print | xargs grep -i "fvsfile" I want... (2 Replies)
Discussion started by: Mani_apr08
2 Replies

7. Shell Programming and Scripting

Performance issue while using find command

Hi, I have created a shell script for Server Log Automation Process. I have used find xargs grep command to search the string. for Example, find -name | xargs grep "816995225" > test.txt . Here my problem is, We have lot of records and we want to grep the string... (4 Replies)
Discussion started by: nanthagopal
4 Replies

8. Shell Programming and Scripting

Find command issue

Guys, Here is my requirement.. Sample.cfg file="*log.gz *txt.gz" sample.sh #!/bin/sh . $HOME/Sample.cfg find . -name "$file" -mtime +20 -exec ls -la {} \; Its not finding the given *log.gz and txt.gz files. Could anyone please help me? (8 Replies)
Discussion started by: AraR87
8 Replies

9. Shell Programming and Scripting

Issue in Find and mv command

Hi I am using the below code to find mv the files. Files are moving to the Target location as expected but find is displaying some errors like below. find ./ -name "Archive*" -mtime +300 -exec mv {} /mnt/X/ARC/ \; find: `./Archive_09-30-12': No such file or directory find:... (6 Replies)
Discussion started by: rakeshkumar
6 Replies

10. Shell Programming and Scripting

Find command issue

Hi Guys, I have a file called error.logs. am just trying to display the content in the file which was modified last 1 day. I tried below command but it doesnt give the proper output. find /u/text/vinoth/bin "error.logs" -mtime -1 -exec cat {} \; >> mail.txt Any help is much... (21 Replies)
Discussion started by: Vinoth Kumar G
21 Replies
pbm(5)								File Formats Manual							    pbm(5)

NAME
pbm - portable bitmap file format DESCRIPTION
The portable bitmap format is a lowest common denominator monochrome file format. It serves as the common language of a large family of bitmap conversion filters. Because the format pays no heed to efficiency, it is simple and general enough that one can easily develop pro- grams to convert to and from just about any other graphics format, or to manipulate the image. This is not a format that one would normally use to store a file or to transmit it to someone -- it's too expensive and not expressive enough for that. It's just an intermediary format. In it's purest use, it lives only in a pipe between two other programs. The format definition is as follows. A PBM file consists of a sequence of one or more PBM images. There are no data, delimiters, or padding before, after, or between images. Each PBM image consists of the following: - A "magic number" for identifying the file type. A pbm image's magic number is the two characters "P4". - Whitespace (blanks, TABs, CRs, LFs). - The width in pixels of the image, formatted as ASCII characters in decimal. - Whitespace. - The height in pixels of the image, again in ASCII decimal. - Newline or other single whitespace character. - A raster of Height rows, in order from top to bottom. Each row is Width bits, packed 8 to a byte, with don't care bits to fill out the last byte in the row. Each bit represents a pixel: 1 is black, 0 is white. The order of the pixels is left to right. The order of their storage within each file byte is most significant bit to least significant bit. The order of the file bytes is from the beginning of the file toward the end of the file. - Characters from a "#" to the next end-of-line, before the width/height line, are comments and are ignored. There is actually another version of the PBM format, even more more simplistic, more lavishly wasteful of space than PBM, called Plain PBM. Plain PBM actually came first, but even its inventor couldn't stand its recklessly squanderous use of resources after a while and switched to what we now know as the regular PBM format. But Plain PBM is so redundant -- so overstated -- that it's virtually impossible to break. You can send it through the most liberal mail system (which was the original purpose of the PBM format) and it will arrive still readable. You can flip a dozen random bits and easily piece back together the original image. And we hardly need to define the format here, because you can decode it by inspection. The difference is: - There is exactly one image in a file. - The "magic number" is "P1" instead of "P4". - Each pixel in the raster is represented by a byte containing ASCII '1' or '0', representing black and white respectively. There are no fill bits at the end of a row. - White space in the raster section is ignored. - You can put any junk you want after the raster, if it starts with a white space character. - No line should be longer than 70 characters. Here is an example of a small bitmap in the plain PBM format: P1 # feep.pbm 24 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 You can generate the Plain PBM format from the regular PBM format (first image in the file only) with the pnmtoplainpnm program. Programs that read this format should be as lenient as possible, accepting anything that looks remotely like a bitmap. COMPATIBILITY
Before July 2000, there could be at most one image in a PBM file. As a result, most tools to process PBM files ignore (and don't read) any data after the first image. SEE ALSO
libpbm(3),pnm(5),pgm(5),ppm(5) AUTHOR
Copyright (C) 1989, 1991 by Jef Poskanzer. 05 March 2000 pbm(5)
All times are GMT -4. The time now is 08:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy