Sponsored Content
Full Discussion: Find missing .ibd files
Top Forums Shell Programming and Scripting Find missing .ibd files Post 302966024 by drl on Saturday 6th of February 2016 01:53:38 PM
Old 02-06-2016
Hi.

Using shell constructs:
Code:
#!/usr/bin/env bash

# @(#) s1       Demonstrate finding missing files based on prefix-suffix.

# Utility functions: print-as-echo, print-line-with-visual-space, debug.
# export PATH="/usr/local/bin:/usr/bin:/bin"
LC_ALL=C ; LANG=C ; export LC_ALL LANG
pe() { for _i;do printf "%s" "$_i";done; printf "\n"; }
pl() { pe;pe "-----" ;pe "$*"; }
db() { ( printf " db, ";for _i;do printf "%s" "$_i";done;printf "\n" ) >&2 ; }
db() { : ; }
C=$HOME/bin/context && [ -f $C ] && $C

pl " Current content of frm and ibd files:"
ls *.frm *.ibd

pl " Results:"
for i in *.frm
do
  [ ! -f ${i%%.frm}.ibd ] && printf " Missing ${i%%.frm}.ibd\n"
done

exit 0

producing:
Code:
$ ./s1

Environment: LC_ALL = C, LANG = C
(Versions displayed with local utility "version")
OS, ker|rel, machine: Linux, 3.16.0-4-amd64, x86_64
Distribution        : Debian 8.3 (jessie) 
bash GNU bash 4.3.30

-----
 Current content of frm and ibd files:
a.frm  a.ibd  b.frm  b.ibd  c.frm  d.frm

-----
 Results:
 Missing c.ibd
 Missing d.ibd

See man bash for details, search for %% in parameter section.

Best wishes ... cheers, drl
 

10 More Discussions You Might Find Interesting

1. AIX

how to find missing files

Hi on friday one user from peoplesoft lost his file. mean he don't know he saved it or removed it. but, he need the file and it is most valuable. so i searched the file in the server, i got the some with same name on /peoplesoft/..../print directory. is these two are the same one or... (1 Reply)
Discussion started by: honeym210
1 Replies

2. Shell Programming and Scripting

Compare 2 folders to find several missing files among huge amounts of files.

Hi, all: I've got two folders, say, "folder1" and "folder2". Under each, there are thousands of files. It's quite obvious that there are some files missing in each. I just would like to find them. I believe this can be done by "diff" command. However, if I change the above question a... (1 Reply)
Discussion started by: jiapei100
1 Replies

3. Shell Programming and Scripting

Find missing files from a list

counter=0; while read line; do ] && let counter=counter+1; done < input_file.txt echo $counter The above code is reading a file line by line and checking whether the filenames mentioned in the file exist or not . At present the o/p is value of counter I want to echo out the name of... (5 Replies)
Discussion started by: ultimatix
5 Replies

4. Shell Programming and Scripting

find: missing argument to `-exec' while redirecting using find in perl

Hi Friends, Please help me to sort out this problem, I am running this in centos o/s and whenever I run this script I am getting "find: missing argument to `-exec' " but when I run the same code in the command line I didn't find any problem. I am using perl script to run this ... (2 Replies)
Discussion started by: ramkumarselvam
2 Replies

5. UNIX for Dummies Questions & Answers

find/xargs/*grep: find multi-line empty "try-catch" blocks - eg, missing ; not in a commented block

How can I recursively find all files in a directory and print out the file and first line number of any text blocks that match the below cases? This would seem to involve find, xargs, *grep, regex, etc. In summary, I want to find so-called empty "try-catch blocks" that do not contain code... (0 Replies)
Discussion started by: lifechamp
0 Replies

6. Shell Programming and Scripting

Help need to find out the missing files in the directory

Hi All, Below is my requirement. I want to display the missing files in the directory. Below is my example From SFTP we are copying 10 files every day. if any files missed on that day need to send a notification with missing files Test1.dat 20121107_00_file.csv 20121107_01_file.csv... (8 Replies)
Discussion started by: bbc17484
8 Replies

7. Shell Programming and Scripting

Find the missing sequence

Dear all i am having file with max 24 entries. i want to find which sequence is missing file is like this df00231587.dat df01231587.dat df03231587.dat df05231587.dat . . . df23231587.dat the changing seq is 00-23,so i would like to find out which seq is missing like in above... (13 Replies)
Discussion started by: sagar_1986
13 Replies

8. Shell Programming and Scripting

Compare 2 files and find missing fields awk

Hello experts! I have 2 files. file1 is a list file containing uniquely names. e.g.: name1 number number name2 number number name5 number number name10 number number ... file2 is a data file arbitrary containing the names of file1 in paragraphs separated by "10" e.g. name4 ... (3 Replies)
Discussion started by: phaethon
3 Replies

9. Shell Programming and Scripting

Find list of files missing read & execute permission

Hi, I'm writing a post-upgrade script and I want to find which files don't have read and execute to everyone. I can run a find . ! -perm, but then I have to use a list of the possible permissions (777,775, 755 etc). Is there a more elegant solution? Thanks (2 Replies)
Discussion started by: Catullus
2 Replies

10. Shell Programming and Scripting

How to find list of missing files based on the file format?

Hi All, In the file names we have dates. Based on the file format given by the user, if any file is not existed for a particular date with in a given interval we should consider that file is missing. I have the below files in the directory /bin/daily/voda_files. ... (9 Replies)
Discussion started by: nalu
9 Replies
FRM(1)								   User Commands							    FRM(1)

NAME
frm - display From: lines. SYNOPSIS
frm.mailutils [OPTION...] [URL ...] DESCRIPTION
GNU frm -- display From: lines. -d, --debug enable debugging output -f, --field=NAME header field to display -l, --to include the To: information -n, --number display message numbers -q, --query print a message if the mailbox contains some unread mail -Q, --Quiet do not display headers -s, --status=STATUS select messages with the specific attribute: new, unread, old (same as unread) or read (or any unambiguous abbreviation of these) -S, --summary print a summary of messages -t, --align tidy mode: align subject lines --tls[=BOOL] enable TLS support Common options --config-file=FILE, --rcfile=FILE load this configuration file --config-help show configuration file summary --config-lint, --rcfile-lint check configuration file syntax and exit --config-verbose, --rcfile-verbose verbosely log parsing of the configuration files --no-site-config, --no-site-rcfile do not load site configuration file --no-user-config, --no-user-rcfile do not load user configuration file --set=PARAM=VALUE set configuration parameter --show-config-options show compilation options Global debugging settings --debug-level=LEVEL set Mailutils debugging level --debug-line-info show source info with debugging messages --license print license and exit -?, --help give this help list --usage give a short usage message -V, --version print program version Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. REPORTING BUGS
Report bugs to <bug-mailutils@gnu.org>. SEE ALSO
The complete GNU mailutils manual is not available in Debian systems due to licensing reasons. You can find this manual online in the GNU mailutils webpage: http://www.gnu.org/software/mailutils/manual/index.html. Please note this manpage was automatically generated by the Debian mailutils packagers. Do not file bugs for its content to the GNU Mailu- tils upstream authors. FSF
May 2011 FRM(1)
All times are GMT -4. The time now is 07:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy