The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Solaris 9 Web Start Upgrade using -nowin - still complains about X server calenti SUN Solaris 2 01-17-2008 03:44 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-14-2008
Registered User
 

Join Date: Oct 2007
Posts: 9
Tar complains.......

That there is 'no such file or directory'?!?!?!?!?

I am using tar to save at directory level, yet the error I am getting refers to a file within this directory:

tar: /apps/hiport/spool/ctree/L0000821.FCS: No such file or directory

(the bit in bold is the directory that was in the tar -cf command)

Does tar catalog the directory prior to saving thus felt that this file should have existed, or could it be possible for someone to have deleted this file whilst it was being saved?
Reply With Quote
Forum Sponsor
  #2  
Old 03-16-2008
Registered User
 

Join Date: Mar 2008
Location: /bin/sh
Posts: 352
So did you check if the file "/apps/hiport/spool/ctree/L0000821.FCS" still exists..?
Reply With Quote
  #3  
Old 03-17-2008
Registered User
 

Join Date: Oct 2007
Posts: 9
Sorry, should have explained...

The file no longer existed.
Reply With Quote
  #4  
Old 03-17-2008
Registered User
 

Join Date: Mar 2008
Location: /bin/sh
Posts: 352
Well difficult to tell exactly what happened..from the description.But to avoid such scenarios, you can get a list of , what all has been included in the tar file. Following piece of code might help..


# Get full list of sub-directories and files in tar file
print
print "Determining list of files archived -- this may take 3-4 minutes. Process starting . . ."
cat $TARFILE | /usr/contrib/bin/gunzip | tar -tVf - >$LISTFILE
print " . . . Listing now complete."
num_files_in_tar=$(cat $LISTFILE | wc -l)
num_directory_files_in_tar=$(cat $LISTFILE | grep ^d | wc -l)
num_link_files_in_tar=$(cat $LISTFILE | grep ^l | wc -l)
num_ordinary_files_in_tar=$(cat $LISTFILE | grep ^- | wc -l)
num_block_files_in_tar=$(cat $LISTFILE | grep ^b | wc -l)
num_character_files_in_tar=$(cat $LISTFILE | grep ^c | wc -l)
num_network_files_in_tar=$(cat $LISTFILE | grep ^n | wc -l)
num_fifo_files_in_tar=$(cat $LISTFILE | grep ^p | wc -l)
num_socket_files_in_tar=$(cat $LISTFILE | grep ^s | wc -l)
let num_other_files_in_tar=num_ordinary_files_in_tar+num_block_files_in_tar+num_character_files_in_tar+n um_network_files_in_tar+num_fifo_files_in_tar+num_socket_files_in_tar

where :
TARFILE : Name of your tar file.
LISTFILE : Name of the file which would be used for listing.

LISTFILE=/path_name/archive_lst_$(date +%Y%m%d_%H%M)

Hope this helps..

Thanks!
nua7
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0