Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to check if the same file exists multiple times? Post 302685037 by xbin on Friday 10th of August 2012 02:34:26 PM
Old 08-10-2012
If you are looking for files with the same name and content then:
Code:
find . -type f -name test.dat -exec cksum {} +

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check if a file exists with certain prefix

Hi guys, How would i check a file exists with certainprefix? i have a directory with some files: ABC1 ABC2 ABC3 etc.. and want to do: please note i am using the korn shell environment.As when i gone through some stuff on then net i came to know some of the options will work... (11 Replies)
Discussion started by: raoscb
11 Replies

2. Shell Programming and Scripting

check a file is exists in multiple tar file?

I have list of ‘tar' format files in a folder. I want to check a particular file is exists in the tar files. Currently I am using the below command to check the scenario. tar -tvf first.tar | grep ‘myfile.txt' The command able to searched a single ‘tar' file only. But I want to search... (7 Replies)
Discussion started by: k_manimuthu
7 Replies

3. Shell Programming and Scripting

Check to see if a file exists?

Hi. I'd like to have an IF-Then-Else statement where I can check to see if a file exists? We have the Bourne Shell by default. I'm looking for the syntax to do something like this: if myfile.txt exists then ...my code else ...my code end if Any help would be greatly... (5 Replies)
Discussion started by: buechler66
5 Replies

4. Shell Programming and Scripting

Script to check file exists

Hi, I am trying to write a script which checks if any file exists with "*.log" or "*.out" in Directory below is the code #------------------ path=/abd/xyz/ if ; then echo "Good" else echo "Failure" fi #-------------------------- its always going to else part and printing... (8 Replies)
Discussion started by: ch33ry
8 Replies

5. Shell Programming and Scripting

bash: check if file exists(without using if)

basically im trying to make this work in a bash shell script without using if statements if then echo testfile exists! fi what it does is check if the file exists or not i have this line but its not working, it checks if the testfile exists if it doesnt it 2> to the dev null... (3 Replies)
Discussion started by: gangsta
3 Replies

6. Shell Programming and Scripting

how to check to see if a file exists?

I want to write a script to see if various files exist. What I want to do is have the script search in various directories if a file exist, and if not, then output something like "/path/file does not exist". I don't actually know of how to check and see if a file exists or not. What I have in mind... (2 Replies)
Discussion started by: astropi
2 Replies

7. Shell Programming and Scripting

File exists, but cannot be opened.How to check- whether it could be opened to read when it exists

Hi #Testing for file existence if ; then echo 'SCHOOL data is available for processing' else echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING' : i wrote a script, where it begins by checking if file exists or not. If it exists, it truncates the database... (2 Replies)
Discussion started by: rxg
2 Replies

8. Shell Programming and Scripting

Check if file exists or not

Hi, I want to check if the file exists or not in the directory. i am trying below code but not working. File="/home/va59657/Account_20090213*.dat" echo "$File" if ]; then echo "file found" else echo "file not found" fi However i am getting file not found even if file exits as... (5 Replies)
Discussion started by: Vivekit82
5 Replies

9. Shell Programming and Scripting

To check if file exists

Hi, I have the below code written. However I am not getting the desired output I am checking if the particular path has file in it. #!/bin/bash ls -l /IRS2/IRS2_ODI/INFILE/*LS* 1>/dev/null 2>/dev/null if then echo $? echo "File Exists" fi ... (3 Replies)
Discussion started by: Shanmugapriya D
3 Replies

10. UNIX for Beginners Questions & Answers

Check if file exists

I need to check whether a file exists and has been changed. The file should contain a specific string. The file should also have been changed within the last ten seconds. How do I do that? (3 Replies)
Discussion started by: locoroco
3 Replies
webcheck(1)							   User Commands						       webcheck(1)

NAME
webcheck - website link checker SYNOPSIS
webcheck [OPTION]... URL DESCRIPTION
webcheck will check the document at the specified URL for links to other documents, follow these links recursively and generate an HTML report. -i, --internal=PATTERN Mark URLs matching the PATTERN (perl-type regular expression) as an internal link. Can be used multiple times. Note that the PATTERN is matched against the full URL. URLs matching this PATTERN will be considered internal, even if they match one of the --external PATTERNs. -x, --external=PATTERN Mark URLs matching the PATTERN (perl-type regular expression) as an external link. Can be used multiple times. Note that the PATTERN is matched against the full URL. -y, --yank=PATTERN Do not check URLs matching the PATTERN (perl-type regular expression). Like the -x flag, though this option will cause webcheck to not check the link matched by regex whereas -x will check the link but not its children. Can be used multiple times. Note that the PATTERN is matched against the full URL. -b, --base-only Consider any URL not starting with the base URL to be external. For example, if you run webcheck -b http://www.example.com/foo then http://www.example.com/foo/bar will be considered internal whereas http://www.example.com/ will be considered external. By default all the pages on the site will be considered internal. -a, --avoid-external Avoid external links. Normally if webcheck is examining an HTML page and it finds a link that points to an external document, it will check to see if that external document exists. This flag disables that action. --ignore-robots Do not retrieve and parse robots.txt files. By default robots.txt files are retrieved and honored. If you are sure you want to ignore and override the webmaster's decision this option can be used. For more information on robots.txt handling see the NOTES section below. -q, --quiet, --silent Do not print out progress as webcheck traverses a site. -d, --debug Print debugging information while crawling the site. This option is mainly useful for developers. -o, --output=DIRECTORY Output directory. Use to specify the directory where webcheck will dump its reports. The default is the current directory or as specified by config.py. If this directory does not exist it will be created for you (if possible). -c, --continue Try to continue from a previous run. When using this option webcheck will look for a webcheck.dat in the output directory. This file is read to restore the state from the previous run. This allows webcheck to continue a previously interrupted run. When this option is used, the --internal, --external and --yank options will be ignored as well as any URL arguments. The --base-only and --avoid-external options should be the same as the previous run. Note that this option is experimental and it's semantics may change with coming releases (especially in relation to other options). Also note that the stored files are not guaranteed to be compatible between releases. -f, --force Overwrite files without asking. This option is required for running webcheck non-interactively. -r, --redirects=N Redirect depth. the number of redirects webcheck should follow when following a link. 0 implies to follow all redirects. -u, --userpass=URL Specify a URL with username and password information to use for basic authentication when visiting the site. e.g. http://test:secret@example.com/ This option may be specified multiple times. -w, --wait=SECONDS Wait SECONDS between document retrievals. Usually webcheck will process a url and immediately move on to the next. However on some loaded systems it may be desirable to have webcheck pause between requests. This option can be set to any non-negative number. -v, --version Show version of program. -h, --help Show short summary of options. URL CLASSES
URLs are divided into two classes: Internal URLs are retrieved and the retrieved item is checked for syntax. Also, the retrieved item is searched for links to other items (of any class) and these links are followed. External URLs are only retrieved to test whether they are valid and to gather some basic information from them (title, size, content-type, etc). The retrieved items are not inspected for links to other items. Apart from their class, URLs can also be considered yanked (as specified with the --yank or --avoid-external options). The URLs can be either internal or external and will not be retrieved or checked at all. URLs of unsupported schemes are also considered yanked. EXAMPLES
Check the site www.example.com but consider any path with "/webcheck" in it to be external. webcheck http://www.example.com/ -x /webcheck NOTES
When checking internal URLs webcheck honors the robots.txt file, identifying itself as user-agent webcheck. Disallowed links will not be checked at all as if the -y option was specified for that URL. To allow webcheck to crawl parts of a site that other robots are disallowed, use something like: User-agent: * Disallow: /foo User-agent: webcheck Allow: /foo ENVIRONMENT
<scheme>_proxy Proxy url for <scheme>. REPORTING BUGS
Bug reports shoult be sent to the mailing list <webcheck-users@lists.arthurdejong.org>. More information on reporting bugs can be found on the webcheck homepage: http://arthurdejong.org/webcheck/ COPYRIGHT
Copyright (C) 1998, 1999 Albert Hopkins (marduk) Copyright (C) 2002 Mike W. Meyer Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Arthur de Jong webcheck is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The files produced as output from the software do not automatically fall under the copyright of the software, unless explicitly stated otherwise. Version 1.10.4 Sep 2010 webcheck(1)
All times are GMT -4. The time now is 05:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy