How to Check whether list file present in TXT file exist or not


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to Check whether list file present in TXT file exist or not
Prev   Next
# 1  
Old 05-28-2009
How to Check whether list file present in TXT file exist or not

Hi All,

I have txt file which has list of files. I have to check whether these files exist or not.

Thanks
supriya
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check if file is present using input from another file

Hello, I have a comma delimited file such as: cat /statistics/support/input.txt ID,Serial,quantitity,atribute1,atribute2 1,89569698,5,800,9900, 1,35568658,8,1200,5550 1,89569698,8,320,5500 1,68753584,85,450,200 ID should always have 1 digit, Serial 8 digits, and the others may... (2 Replies)
Discussion started by: alex2005
2 Replies

2. Shell Programming and Scripting

Script to list files not present in audio.txt file

I am having following folder structure. /root/audios/pop /root/audios/jazz /root/audios/rock Inside those pop, jazz, rock folders there are following files, p1.ul, p2.ul, p3.ul, j1.ul, j2.ul, j3.ul, r1.ul, r2.ul, r3.ul And I have a file named as "audio.txt" in the path /root/audios,... (11 Replies)
Discussion started by: gopikrish81
11 Replies

3. Shell Programming and Scripting

Check if file exist

Hi, I created following script to check if file exist: #!/bin/bash SrcDir=$1 SrcFileName=$2 SrcTimePeriod=$3 if ;then echo 1 else echo 0 fi I ran it like: /apps/Scripts/FileExist.sh /apps/Inbox file1 2nd_period_2010 Even file exist at that location, my above command is... (4 Replies)
Discussion started by: palak08
4 Replies

4. Shell Programming and Scripting

Check if file exist

Hi, I am trying to create a bash script which will check if file exist then remove that file else do nothing. I have to do same process for three files in same script. I have written code for one file and trying to run it. if then rm -r /user1/abc/File1 fi When I run this code it... (1 Reply)
Discussion started by: palak08
1 Replies

5. Shell Programming and Scripting

Help needed in extracting text present between two headers in .txt file

Hi All, Please help me out in fllowing problem. I have text file which contains the data in following format. Contents of file.txt are setregid02 Test that setregid() fails and sets the proper errno values when a non-root user attemps to change the real or effective... (2 Replies)
Discussion started by: varshit
2 Replies

6. Shell Programming and Scripting

Check if file exist

Hi Does anybody know how I can check if a file exists i.e. see bellow, this doesn't work by the way and if tried countless variations on this file1=$one/file111.txt if then echo "Present" else echo "Not present" fi result : Not present (file is already present, eventhough its... (3 Replies)
Discussion started by: gksenthilkumar
3 Replies

7. Shell Programming and Scripting

ls > file - Creating file containing the list of all files present in a directory

Hi All, I need to create a file which contains the list of all the files present in that directory. e.g., ls /export/home/user/*.dat > list_file.dat but what i am getting is: $ ls /export/home/user/*.dat > list_file.dat /export/home/user/*.dat: No such file or directory But I have... (1 Reply)
Discussion started by: pranavagarwal
1 Replies

8. Shell Programming and Scripting

Have a shell script check for a file to exist before processing another file

I have a shell script that runs all the time looking for a certain type of file and then it processes the file through a series of other scripts. The script is watching a directory that has files uploaded to it via SFTP. It already checks the size of the file to make sure that it is not still... (3 Replies)
Discussion started by: heprox
3 Replies

9. UNIX for Dummies Questions & Answers

how to check if the file exist or not?

say i would like to check if the file is existed before i use rm command. How can i do it? i know if i can use find, but i would like to have a good interface (in a shell script) thks (3 Replies)
Discussion started by: gusla
3 Replies
Login or Register to Ask a Question
DBD(1)								   Netatalk 2.2 							    DBD(1)

NAME
dbd - CNID database maintenance SYNOPSIS
dbd [-evx] {-d [-i] | -s [-c|-n] | -r [-c|-f] | -u} volumepath DESCRIPTION
dbd can dump, scan, reindex and rebuild Netatalk dbd CNID databases. It must be run with appropiate permissions i.e. as root. dbd -s|-r can be run on active volumes, but dbd -rf, which wipes the db before rebuilding it, checks and enforces that the chosen volume is not in use. COMMANDS
-d Dump CNID database. With -i dump indexes too. -s Scan volume: o Compare CNIDs in database with volume o Test if .AppleDouble directories exist o Test if AppleDouble files exist o Report orphaned AppleDouble files o Report directories inside .AppleDouble directories o Check name encoding by roundtripping, log on error o Check for orphaned CNIDs in database (requires -e) o Open and close adouble files Options: -c Don't check .AppleDouble stuff, only check orphaned. -n Don't open CNID database, skip CNID checks, only traverse filesystem -r Rebuild volume. With -f wipe database and rebuild from CNIIDs stored in AppleDouble files. o Sync CNIDSs from database with volume o Ensure .AppleDouble directories exist o Ensure AppleDouble files exist o Delete orphaned AppleDouble files o Report directories inside .AppleDouble directories o Check name encoding by roundtripping, log on error o Delete orphaned CNIDs in database (requires -e) o Open and close adouble files Options: -c Don't create .AppleDouble stuff, only cleanup orphaned. -f Wipe database and rebuild from IDs stored in AppleDouble files, only available for volumes without nocnidcache option. Implies -e. -u Upgrade: Opens the database which triggers any necessary upgrades, then closes and exits. OPTIONS
-e Only work on inactive volumes and lock them (exclusive) -x Rebuild indexes (just for completeness, mostly useless!) -v verbose WARNING
In order to be able to run -rf reconstructing the CNIDs in the database from the AppleDouble files, make sure you've run a -r rebuild sometimes before, where the CNIDs then would have been synched between database and AppleDouble files. Also be careful about the option nocnidcache. Avoid this option if at all possible, because if prevents you from being able to use -f. CNID BACKGROUND
The CNID backends maintains name to ID mappings. If you change a filename outside afpd(8) (shell, samba), the CNID db will not know and not reflect that change. Netatalk tries to recover from such inconsistencies as gracefully as possible. The mechanisms to resolve such inconsistencies may fail sometimes, though, as this is not an easy task to accomplish. E.g. if several names in the path to the file or directory have changed, things may go wrong. If you change a lot of filenames at once, chances are higher that the afpds fallback mechanisms fail, i.e. files will be assigned new IDs, even though the file hasn't changed. SEE ALSO
cnid_metad(8), cnid_dbd(8) Netatalk 2.2 12 Oct 2010 DBD(1)