03-18-2011
DB Access Command Line Utility
To read/write to a DB from Java or Perl, you usually have to install/reference several drivers and write a whole bunch of boilerplate DB access code.
I'm curious if someone has written a command line utility for Unix/Linux for simple database access for the major providers, something like:
udbaccess -t [DB type] -c [connection string for db] -u [user id and password] -s [SQL script]
and it just executes the SQL script, and returns something. I would think that something like this would exist, but haven't found it.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to write a script using the 'find' command and it's -exec option to run a compound command against the files found.
Example:
find . -name "*.conf" -exec cat {} | grep "#" > /tmp/comments.list \;
Of course the above doesn't work. So I experimented for a bit to see if there was... (6 Replies)
Discussion started by: deckard
6 Replies
2. Programming
HI
I have a messaging s/w daemon(TIBCO rvrd) provided by vendor which will accept connections from various clients and routes messages to the destinations. In order to route it internally uses two ports(one tcp adn one udp).
I want to know on which port(tcp/udp) it is transmitting... (3 Replies)
Discussion started by: axes
3 Replies
3. Programming
I'm writing a monitoring application. I'd like to periodically get the information provided by the 'top' command line utility from within my code and write the output of 'top' to a file. Wondering if anyone has already done something like this.
Doing
system("top > someFile");
does not create... (6 Replies)
Discussion started by: antoniomorandi
6 Replies
4. Linux
Hi,
What else is the dot used beside relative filepaths in bash? Is it a shell utility as well?
No man entry for dot (.)... (3 Replies)
Discussion started by: varelg
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
Using command-line utility "ftp or sftp", I want to transfer files across Windows and UNIX.
Can you please tell me from where I need to connect to ftp and how do I specify the hostname, credentials and how do I get and put files between DOS and UNIX?
Please provide me as much... (10 Replies)
Discussion started by: Dev_Dev
10 Replies
6. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Develop a utility that will enhance the current file management and
organization functions of Linux.
You... (3 Replies)
Discussion started by: stephanielana1
3 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Please help about these script... i dont have a problem in option 1. But when it comes to options 2 and options 3... (2 Replies)
Discussion started by: amneytia1
2 Replies
8. Red Hat
Hi Folks,
I have installed Centos-6.4 in my VMware. I have enabled the proxy settings in the network and I am able to access the internet through GUI, but unable to browse via the command line. I did the below options as:
1) Added the proxy setting in /etc/environment file.export... (4 Replies)
Discussion started by: gsiva
4 Replies
9. Shell Programming and Scripting
Hi Everyone!
I am facing an issue in running a command line utility from the CRON.
This utility displays IPC statistics on UNIX message queues: The "queue name" and the "count" of messages in the queue.
When running this utility from prompt, it will provide an output on the screen, like the... (4 Replies)
Discussion started by: vai_sh
4 Replies
LEARN ABOUT PHP
fs_cleanacl
FS_CLEANACL(1) AFS Command Reference FS_CLEANACL(1)
NAME
fs_cleanacl - Remove obsolete entries from an ACL
SYNOPSIS
fs cleanacl [-path <dir/file path>+] [-help]
fs cl [-p <dir/file path>+] [-h]
DESCRIPTION
The fs cleanacl command removes from the access control list (ACL) of each specified directory or file any entry that refers to a user or
group that no longer has a Protection Database entry. Such an entry appears on the ACL as an AFS user ID number (UID) rather than a name,
because without a Protection Database entry, the File Server cannot translate the UID into a name.
Cleaning access control lists in this way not only keeps them from becoming crowded with irrelevant information, but also prevents the new
possessor of a recycled AFS UID from obtaining access intended for the former possessor of the AFS UID. (Note that recycling UIDs is not
recommended in any case.)
OPTIONS
-path <dir/file path>+
Names each directory for which to clean the ACL (specifying a filename cleans its directory's ACL). If this argument is omitted, the
current working directory's ACL is cleaned.
Specify the read/write path to each directory, to avoid the failure that results from attempting to change a read-only volume. By
convention, the read/write path is indicated by placing a period before the cell name at the pathname's second level (for example,
/afs/.abc.com). For further discussion of the concept of read/write and read-only paths through the filespace, see the fs mkmount
reference page.
-help
Prints the online help for this command. All other valid options are ignored.
OUTPUT
If there are no obsolete entries on the ACL, the following message appears:
Access list for <path> is fine.
Otherwise, the output reports the resulting state of the ACL, following the header
Access list for <path> is now
At the same time, the following error message appears for each file in the cleaned directories:
fs: '<filename>': Not a directory
EXAMPLES
The following example illustrates the cleaning of the ACLs on the current working directory and two of its subdirectories. Only the second
subdirectory had obsolete entries on it.
% fs cleanacl -path . ./reports ./sources
Access list for . is fine.
Access list for ./reports is fine.
Access list for ./sources is now
Normal rights:
system:authuser rl
pat rlidwka
PRIVILEGE REQUIRED
The issuer must have the "a" (administer) permission on each directory's ACL (or the ACL of each file's parent directory); the directory's
owner and the members of the system:administrators group have the right implicitly, even if it does not appear on the ACL.
SEE ALSO
fs_listacl(1), fs_mkmount(1)
COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas
Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
OpenAFS 2012-03-26 FS_CLEANACL(1)