Sponsored Content
Full Discussion: cannot stat error
Top Forums Shell Programming and Scripting cannot stat error Post 302437535 by rss0213 on Thursday 15th of July 2010 10:07:06 AM
Old 07-15-2010
cannot stat error

I'm trying to find .tif files in a directory tree and rename them prior to zipping them and moving them to another dir. this is my code:

Code:
   cd $TMPPATH
   pwd
   ctr=0
   for i in 'find . -name "*.tif"'
   do
      let "ctr+=1"
      newtifname=$DATEDIR"_"$SEQ"_"$ctr".tif"
      mv "$i" "$newtifname" | zip -j $output_zip_file -@ >> $LOG
   done

When I execute this, I get the following error:

Quote:
/tmp/image/LKOFAX/04
mv: cannot stat `find . -name "*.tif"': No such file or directory
But when I cd to this directory (outside my script) and execute the same find command, I see a *.tif images.

Quote:
[apache@fpu0a corr]$ cd /tmp/image/LKOFAX/04
[apache@fpu0a 04]$ find . -name "*.tif"
./245678/20100709/outputs/i4/corr/1.tif
Anyone see what I'm doing wrong?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sort can't stat error.

I am using the command below to sort unique a file and I keep getting this error that sort can't stat. Error: sort: can't stat /xxxx/xxxxx/2005/xxxxxx/out_20050602155231/test.txt: No such file or directory Does anybody have an idea when this error could occur. Thanks, Radhika. if ... (5 Replies)
Discussion started by: radhika
5 Replies

2. UNIX for Advanced & Expert Users

Cannot Stat Error

I'm not sure where to post this so I'll try it here. I'm trying to load a software package to my server and I keep getting a cannot stat error. I'll post the error line below along with my configuartaion line. Can anyone help or point me in the right direction. Thanks! This is the error. ... (1 Reply)
Discussion started by: Homer Allman
1 Replies

3. UNIX for Advanced & Expert Users

stat

the output of stat command is Size: 238 Blocks: 8 IO Block: 4096 regular file Device: 80ah/2058d Inode: 736783 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 500/ gajju) Gid: ( 500/ gajju) Access: 2008-09-08 20:00:15.000000000 +0530 Modify: 2008-09-08... (6 Replies)
Discussion started by: gajju
6 Replies

4. UNIX for Dummies Questions & Answers

what is a "find stat() error"

I'm searching for an oracle emtab file. I do a find / -name emtab -print and the first result gives me find: stat() error /apps/tomcat/jakarta-tomcat-5.5.9/bin/console.txt: I/O error Can someone explain what this error means? thanks, (2 Replies)
Discussion started by: orahi001
2 Replies

5. Solaris

How to resolve error "INIT: Cannot stat /etc/inittab, errno: 2"

Hi All, I am getting an error message when I execute command “zlogin -C sunsrv4z5” on my root server. INIT: Cannot stat /etc/inittab, errno: 2 INIT: Cannot stat /etc/inittab, errno: 2 As per my analysis it seems that some files inside /etc folder are deleted. This server was... (14 Replies)
Discussion started by: surbhit4u
14 Replies

6. Programming

Error in bits/stat.h

i have a piece of code to be compiled but unfortunately i keep getting the below error /usr/include/bits/stat.h:88: error: field ‘st_atim' has incomplete type /usr/include/bits/stat.h:89: error: field ‘st_mtim' has incomplete type /usr/include/bits/stat.h:90: error: field ‘st_ctim' has... (1 Reply)
Discussion started by: niranjanvg
1 Replies

7. Shell Programming and Scripting

Ignoring mv commands "cannot stat" error ?

So, my third thread here ^^ and still asking questions. Thanks for you patience and help, I really appreciated it ;) I currently use a shell script to move folders of songs from one to another location on my harddrive. I use something like this: sudo mv /var/mobile/Media/"My Music"/"Vasco... (3 Replies)
Discussion started by: pasc
3 Replies

8. Shell Programming and Scripting

Intermittent "cp: cannot stat" error with nested loop

I have a bash script that has been running (on SUSE 9.3) dozens of times over the past couple of years without error. Recently it has been hitting intermittent “cp: cannot stat FILE: No such file or directory” errors. The script has nested loops that continuously process files in a... (2 Replies)
Discussion started by: jcart
2 Replies

9. Shell Programming and Scripting

Stat value changes

Die to what all operations, the "Modify" and "Change" values of stat output changes for a file. I found, during editing a file, Change and Modify alters. When chmod'ing Change alters, while Modify doesnot alters. Is there more situations where these changes? (1 Reply)
Discussion started by: anil510
1 Replies

10. Solaris

/bin/find: stat() error <File> : No such file or directory

Hi, I am getting below error in Solaris 10 SPARC when trying to issue a search on /var/tmp partition Below is the query /bin/find /var/tmp/ -type f -atime +1 Below is the result /bin/find: stat() error <File> : No such file or directory (28 Replies)
Discussion started by: prash358
28 Replies
QUERY(3T)																 QUERY(3T)

NAME
TIFFCurrentRow, TIFFCurrentStrip, TIFFCurrentTile, TIFFCurrentDirectory, TIFFLastDirectory, TIFFFileno, TIFFFileName, TIFFGetMode, TIFF- IsTiled, TIFFIsByteSwapped, TIFFIsUpSampled, TIFFIsMSB2LSB - query routines SYNOPSIS
#include <tiffio.h> uint32 TIFFCurrentRow(TIFF* tif) tstrip_t TIFFCurrentStrip(TIFF* tif) ttile_t TIFFCurrentTile(TIFF* tif) tdir_t TIFFCurrentDirectory(TIFF* tif) int TIFFLastDirectory(TIFF* tif) int TIFFFileno(TIFF* tif) char* TIFFFileName(TIFF* tif) int TIFFGetMode(TIFF* tif) int TIFFIsTiled(TIFF* tif) int TIFFIsByteSwapped(TIFF* tif) int TIFFIsUpSampled(TIFF* tif) int TIFFIsMSB2LSB(TIFF* tif) const char* TIFFGetVersion(void) DESCRIPTION
The following routines return status information about an open TIFF file. TIFFCurrentDirectory returns the index of the current directory (directories are numbered starting at 0). This number is suitable for use with the TIFFSetDirectory routine. TIFFLastDirectory returns a non-zero value if the current directory is the last directory in the file; otherwise zero is returned. TIFFCurrentRow, TIFFCurrentStrip, and TIFFCurrentTile, return the current row, strip, and tile, respectively, that is being read or writ- ten. These values are updated each time a read or write is done. TIFFFileno returns the underlying file descriptor used to access the TIFF image in the filesystem. TIFFFileName returns the pathname argument passed to TIFFOpen or TIFFFdOpen. TIFFGetMode returns the mode with which the underlying file was opened. On UNIX systems, this is the value passed to the open(2) system call. TIFFIsTiled returns a non-zero value if the image data has a tiled organization. Zero is returned if the image data is organized in strips. TIFFIsByteSwapped returns a non-zero value if the image data was in a different byte-order than the host machine. Zero is returned if the TIFF file and local host byte-orders are the same. Note that TIFFReadTile(), TIFFReadStrip() and TIFFReadScanline() functions already nor- mally perform byte swapping to local host order if needed. TIFFIsUpSampled returns a non-zero value if image data returned through the read interface routines is being up-sampled. This can be use- ful to applications that want to calculate I/O buffer sizes to reflect this usage (though the usual strip and tile size routines already do this). TIFFIsMSB2LSB returns a non-zero value if the image data is being returned with bit 0 as the most significant bit. TIFFGetVersion returns an ASCII string that has a version stamp for the TIFF library software. DIAGNOSTICS
None. SEE ALSO
libtiff(3T), TIFFOpen(3T), TIFFFdOpen(3T) October 15, 1995 QUERY(3T)
All times are GMT -4. The time now is 06:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy