Sponsored Content
Full Discussion: scan directory
Top Forums Shell Programming and Scripting scan directory Post 302293606 by fireit on Tuesday 3rd of March 2009 12:43:01 PM
Old 03-03-2009
PART is SABDE and idf is %%e
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

IP Name scan

Hi. how to search a range of IP:s for their registed IP names? Like nslookup or host for all IPs 130.xxx.xxx.1 to 130.xxx.xxx.254 //nicke (2 Replies)
Discussion started by: nicke30
2 Replies

2. UNIX for Advanced & Expert Users

Please let me know Regarding Port Scan

Can any one please let me know below ones 1) How to Perform the Port Scan in Solaris Environment and how to block the unwanted Ports. 2) How to know whether particular Port is listning the requests or not? Thanks Ramkumar.B (7 Replies)
Discussion started by: myramkumar
7 Replies

3. UNIX for Dummies Questions & Answers

scan and move

i have a script to look for a file, but it moves a file that's being used. i want to use: if file exists > 0, and not being updated/used in the last 2 minutes, move to /tmp i can do this much: if then mv filename.txt /tmp else exit fi or how can i check if... (3 Replies)
Discussion started by: tjmannonline
3 Replies

4. Shell Programming and Scripting

Scan directory and sub directories

I am really stuck on a issue and have not been able to find a solution. With the code below I need to not only scan the current directory which as you can see below is... /lcl/sit/apps/Tivoli/ But I also want it to scan all sub directories it finds under Tivoli as well for the same thing... (2 Replies)
Discussion started by: LRoberts
2 Replies

5. Shell Programming and Scripting

A script to scan a directory for XML files,

Hi, I am fairly new to unix/linux scripting (about 1 week) and have written a script to scan a directory for xml files, if found call and oracle procedure passing in the file name and then move the file once processed to an archive area. Now everything seems to be working except when there... (3 Replies)
Discussion started by: apacheuk
3 Replies

6. Shell Programming and Scripting

scan compressed

Hello all I want to help I have some compressed files on the system When you want to unzip these files Delete any file which symlink "ln -s" {{ I need script is necessary Script contain: Any operation to decompress the system is doing to delete any symlink... (0 Replies)
Discussion started by: x-zer0
0 Replies

7. Red Hat

Scan For new LUNS

In Solaris the administrator has to update /kernel/drv/sd.conf file to tell the sd driver to scan for a broader range of scsi devices. Can someone please tell me what file needs to be update in Redhat Linux 5 for the same. Second part of the question is WWN for HBA's can be found (atleast in my... (1 Reply)
Discussion started by: Tirmazi
1 Replies

8. AIX

Scan Rate

Hello, How can i tell ifthe ratio between fr and sr is ok? is fr/sr ratio of 0.9 acceptable? thanks. (1 Reply)
Discussion started by: LiorAmitai
1 Replies

9. UNIX for Dummies Questions & Answers

best way to scan?

i want to scan all open and closed ports on a server. how can i do this. i intend on using nmap, but if there are better ways to do it, please let me know. i understand there are a total of 6335 allowable ports on a server. so out of that 6335, i want to know which is open or closed. id... (1 Reply)
Discussion started by: SkySmart
1 Replies

10. Shell Programming and Scripting

Create automated scan of specific directory using bash

I am trying to use bash to automate the scan of a specific directory using clamav. Having this in place is a network requirement. The below is an attempt to: 1. count the extensions (.txt, .jpeg) in a directory and write them to a virus-scan.log (section in bold) 2. scan each folder in the... (6 Replies)
Discussion started by: cmccabe
6 Replies
Easy(3pm)						User Contributed Perl Documentation						 Easy(3pm)

NAME
DBIx::Easy - Easy to Use DBI interface SYNOPSIS
use DBIx::Easy; my $dbi_interface = new DBIx::Easy qw(Pg template1); $dbi_interface -> insert ('transaction', id => serial ('transaction', 'transactionid'), time => $dbi_interface -> now); $dbi_interface -> update ('components', "table='ram'", price => 100); $rows_deleted = $dbi_interface -> delete ('components', 'stock = 0'); $dbi_interface -> makemap ('components', 'id', 'price', 'price > 10'); $components = $dbi_interface -> rows ('components'); $components_needed = $dbi_interface -> rows ('components', 'stock = 0'); DESCRIPTION
DBIx::Easy is an easy to use DBI interface. Currently the Pg, mSQL, mysql, Sybase, ODBC and XBase drivers are supported. CREATING A NEW DBI INTERFACE OBJECT
$dbi_interface = new DBIx::Easy qw(Pg template1); $dbi_interface = new DBIx::Easy qw(Pg template1 racke); $dbi_interface = new DBIx::Easy qw(Pg template1 racke aF3xD4_i); $dbi_interface = new DBIx::Easy qw(Pg template1 racke@linuxia.de aF3xD4_i); $dbi_interface = new DBIx::Easy qw(Pg template1 racke@linuxia.de:3306 aF3xD4_i); The required parameters are the database driver and the database name. Additional parameters are the database user and the password to access the database. To specify the database host use the USER@HOST notation for the user parameter. If you want to specify the port to connect to use USER@HOST:PORT. DESTROYING A DBI INTERFACE OBJECT
It is important that you commit all changes at the end of the interaction with the DBMS. You can either explicitly commit $dbi_interface -> commit (); or do it implicitly: undef $dbi_interface; ERROR HANDLING
sub fatal { my ($statement, $err, $msg) = @_; die ("$0: Statement "$statement" failed (ERRNO: $err, ERRMSG: $msg) "); } $dbi_interface -> install_handler (&fatal); If any of the DBI methods fails, either die will be invoked or an error handler installed with install_handler will be called. CACHING ISSUES
By default, this module caches table structures. This can be disabled by setting $DBIx::Easy::cache_structs to 0. XBASE DRIVER
The DBIx::Easy method rows fails to work with the DBD::XBase driver. METHODS
DATABASE ACCESS process statement $sth = $dbi_interface -> process ("SELECT * FROM foo"); print "Table foo contains ", $sth -> rows, " rows. "; Processes statement by just combining the prepare and execute steps of the DBI. Returns statement handle in case of success. insert table column value [column value] ... $sth = $dbi_interface -> insert ('bar', drink => 'Caipirinha'); Inserts the given column/value pairs into table. Determines from the SQL data type which values has to been quoted. Just pass a refer- ence to the value to protect values with SQL functions from quoting. update table conditions column value [column value] ... $dbi_interface -> update ('components', "table='ram'", price => 100); $dbi_interface -> update ('components', "table='ram'", price => "price + 20"); Updates any row of table which fulfill the conditions by inserting the given column/value pairs. Scalar references can be used to embed strings without further quoting into the resulting SQL statement. Returns the number of rows modified. put table conditions column value [column value] ... delete table conditions $dbi_interface -> delete ('components', "stock=0"); Deletes any row of table which fulfill the conditions. Without conditions all rows are deleted. Returns the number of rows deleted. rows table [conditions] $components = $dbi_interface -> rows ('components'); $components_needed = $dbi_interface -> rows ('components', 'stock = 0'); Returns the number of rows within table satisfying conditions if any. makemap table keycol valcol [condition] $dbi_interface -> makemap ('components', 'idf', 'price'); $dbi_interface -> makemap ('components', 'idf', 'price', 'price > 10'); $dbi_interface -> makemap ('components', 'idf', '*'); $dbi_interface -> makemap ('components', 'idf', '*', 'price > 10'); Produces a mapping between the values within column keycol and column valcol from table. If an condition is given, only rows matching this condition are used for the mapping. In order to get the hash reference to the record as value of the mapping, use the asterisk as the valcol parameter. random_row table conditions [map] Returns random row of the specified table. If map is set, the result is a hash reference of the selected row, otherwise an array refer- ence. If the table doesn't contains rows, undefined is returned. serial table sequence Returns a serial number for table by querying the next value from sequence. Depending on the DBMS one of the parameters is ignored. This is sequence for mSQL resp. table for PostgreSQL. mysql doesn't support sequences, but the AUTO_INCREMENT keyword for fields. In this case this method returns 0 and mysql generates a serial number for this field. fill sth hashref [flag column ...] Fetches the next table row from the result stored into sth and records the value of each field in hashref. If flag is set, only the fields specified by the column arguments are considered, otherwise the fields specified by the column arguments are omitted. view table [name value ...] foreach my $table (sort $dbi_interface -> tables) { print $cgi -> h2 ('Contents of ', $cgi -> code ($table)); print $dbi_interface -> view ($table); } Produces plain text representation of the database table table. This method accepts the following options as name/value pairs: columns: Which columns to display. order: Which column to sort the row after. limit: Maximum number of rows to display. separator: Separator inserted between the columns. where: Display only rows matching this condition. print $dbi_interface -> view ($table, order => $cgi -> param ('order') || '', where => "price > 0"); DATABASE INFORMATION is_table NAME Returns truth value if there exists a table NAME in this database. tables Returns list of all tables in this database. sequences Returns list of all sequences in this database (Postgres only). columns TABLE Returns list of the column names of TABLE. types TABLE Returns list of the column types of TABLE. sizes TABLE Returns list of the column sizes of TABLE. typemap TABLE Returns mapping between column names and column types for table TABLE. sizemap TABLE Returns mapping between column names and column sizes for table TABLE. TIME VALUES now $dbi_interface -> insert ('transaction', id => serial ('transaction', 'transactionid'), time => $dbi_interface -> now); Returns representation for the current time. Uses special values of the DBMS if possible. MONETARY VALUES money2num money Converts the monetary value money to a numeric one. MISCELLANEOUS is_auth_error msg This method decides if the error message msg is caused by an authentification error or not. AUTHORS
Stefan Hornburg (Racke), racke@linuxia.de Dennis Sch[:o]n, ds@1d10t.de Support for Sybase and ODBC provided by David B. Bitton <david@codenoevil.com>. VERSION
0.17 SEE ALSO
perl(1), DBI(3), DBD::Pg(3), DBD::mysql(3), DBD::msql(3), DBD::Sybase(3), DBD::ODBC(3). perl v5.8.8 2007-05-21 Easy(3pm)
All times are GMT -4. The time now is 03:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy