Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to remove same file in the dir and subs? Post 302098504 by kapilraj on Monday 4th of December 2006 04:12:25 PM
Old 12-04-2006
I do it as follows,

find /dir_name -name "kapil.txt" -exec rm -rf {} \;

Deletes "kapil.txt" from /dir_name and any sublevels of that directory tree.

Regards,

Kaps
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using tar for current directory, but not subs

I know that I can type tar -cvf myfile.tar * to tar the current directory and all it's sub directories, but how do I tar ONLY the current directory and skip all the subdirectories? (3 Replies)
Discussion started by: beilstwh
3 Replies

2. UNIX for Dummies Questions & Answers

find and remove last week dir

hello all, I want to ask, how to find last week directory and then remove it.. I have a directory in path /home/backup/ and, inside backup dir, I have 6 dir : - 01_20080414 ( today date ) - 02_20080414 ( today date ) - 01_20080413 - 02_20080413 - 01_20080407 ( last week date ) -... (1 Reply)
Discussion started by: kunimi
1 Replies

3. Shell Programming and Scripting

copying a file from one dir to another dir

hi i have a script compareFiles() { find /tmp/Satya -type f | \ while read filename1 do echo "----------------------------------------$filename1" find /tmp/Satya -type f | \ while read filename2 do if diff $filename1 $filename2 then echo "Both files... (3 Replies)
Discussion started by: Satyak
3 Replies

4. Shell Programming and Scripting

Moving file(s) from dir to dir

Hi, I am fairly new to writing scripts. I am trying to write a script that moves either One or All of the files from one directory to another. I know how to make the actual command to do it, but i don't quite know how to add operators to it, ie -i or -a. I want -i to move one file from... (4 Replies)
Discussion started by: SirJoeh
4 Replies

5. Solaris

remove dir from inherit-pkg-dir

hi i configured zone and have 4 files /usr and /lib /platform /sbin from global zone and i want to exclude /usr/local from /usr any one has an idea ? (2 Replies)
Discussion started by: maxim42
2 Replies

6. UNIX for Dummies Questions & Answers

Copying dir (and sub dir) file names from ftp server to txt file in diff server

Hey all, i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file. any help is appreciated...thank you in advance (1 Reply)
Discussion started by: deking
1 Replies

7. UNIX for Dummies Questions & Answers

How to list all files in dir and sub-dir's recursively along with file size?

I am very new to unix as well as shell scripting. I have to write a script for the following requirement. In have to list all the files in directory and its sub directories along with file path and size of the file Please help me in this regard and many thanks in advance. (3 Replies)
Discussion started by: nmakkena
3 Replies

8. UNIX for Dummies Questions & Answers

List directories, subs and files

Hi, I try to list all files in a folder, including all the subdirs (and their subdirs) and all files contained in each of these folders. I then print it to a simple txt file. I use ls -R -1 >test.txt This sort of does what I need, yet, the result is something like: It reasonably comes... (53 Replies)
Discussion started by: dakke
53 Replies

9. Solaris

remove a user without removing its home dir

HI all, I have wrongly given a wrong home directory to a user. This dir is very critical for my production environment(Can;t afford to lose it for a single minute) Now i want to delete that user, Whenever i try to delete user it tries to delete its home dir. Commnd i use: userdel ... (9 Replies)
Discussion started by: varunksharma87
9 Replies

10. Shell Programming and Scripting

Create file Dir and Sub Dir same time

Hi Guys , I want create files Dire and Sub Dire. as same time using variable. EX: x1="/hk/Pt/put/NC/R1.txt" x2="/hk/pt/Put/Ot/NC/RN.txt" And i want delete all after done with my script. Thanks (2 Replies)
Discussion started by: pareshkp
2 Replies
MYSQL_CLIENT_TEST(1)					       MySQL Database System					      MYSQL_CLIENT_TEST(1)

NAME
mysql_client_test - test client API mysql_client_test_embedded - test client API for embedded server SYNOPSIS
mysql_client_test [options] [test_name] ... mysql_client_test_embedded [options] [test_name] ... DESCRIPTION
The mysql_client_test program is used for testing aspects of the MySQL client API that cannot be tested using mysqltest and its test language. mysql_client_test_embedded is similar but used for testing the embedded server. Both programs are run as part of the test suite. The source code for the programs can be found in in tests/mysql_client_test.c in a source distribution. The program serves as a good source of examples illustrating how to use various features of the client API. mysql_client_test is used in a test by the same name in the main tests suite of mysql-test-run.pl but may also be run directly. Unlike the other programs listed here, it does not read an external description of what tests to run. Instead, all tests are coded into the program, which is written to cover all aspects of the C language API. mysql_client_test supports the following options: o --help, -? Display a help message and exit. o --basedir=dir_name, -b dir_name The base directory for the tests. o --count=count, -t count The number of times to execute the tests. o --database=db_name, -D db_name The database to use. o --debug[=debug_options], -#[debug_options] Write a debugging log if MySQL is built with debugging support. The default debug_options value is 'd:t:o,/tmp/mysql_client_test.trace'. o --getopt-ll-test=option, -g option Option to use for testing bugs in the getopt library. o --host=host_name, -h host_name Connect to the MySQL server on the given host. o --password[=password], -p[password] The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and the password. If you omit the password value following the --password or -p option on the command line, you are prompted for one. o --port=port_num, -P port_num The TCP/IP port number to use for the connection. o --server-arg=arg, -A arg Argument to send to the embedded server. o --show-tests, -T Show all test names. o --silent, -s Be more silent. o --socket=path, -S path The socket file to use when connecting to localhost (which is the default host). o --testcase, -c The option is used when called from mysql-test-run.pl, so that mysql_client_test may optionally behave in a different way than if called manually, for example by skipping some tests. Currently, there is no difference in behavior but the option is included in order to make this possible. o --user=user_name, -u user_name The MySQL user name to use when connecting to the server. o -v dir_name, --vardir=dir_name The data directory for tests. The default is mysql-test/var. COPYRIGHT
Copyright (C) 2007, 2010, Oracle and/or its affiliates This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. AUTHOR
Sun Microsystems, Inc. (http://www.mysql.com/). MySQL 03/31/2010 MYSQL_CLIENT_TEST(1)
All times are GMT -4. The time now is 03:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy