Sponsored Content
Top Forums Shell Programming and Scripting Shell script to find files in dir and updation Post 302906380 by ammulu on Thursday 19th of June 2014 07:35:15 AM
Old 06-19-2014
I tried with below mentioned code and executing script in current dir it's not working .

Code:
#!bin/bash
find $HOME -type f | ls file
 while read file 
 do
    echo $file;
    sed -i 's/ admin$/unixadmin/ /g'  $file
    sed -i 's/ date$/`date +_%m_%d_%y_%H_%M`/ /g' $file
 done

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find and purge a files in a dir

HI All, I have recuirement to purge the files in a directory . In that directory i an having many sub-directory . When i use find command like find ~/work/test/insert -name "*.*" -mtime +12 it is listing the file not accesed before 12 , It also takes the subdirectories inside the... (7 Replies)
Discussion started by: arunkumar_mca
7 Replies

2. Shell Programming and Scripting

How to find sticky bit dir/files

I need to find all sticky bit dir/files on my system and clean them up if necessary. How to I write a script to do this? Thanks. (2 Replies)
Discussion started by: pdtak
2 Replies

3. Shell Programming and Scripting

Shell Script to save/restore files and dir permissions

Hello all: I need found script to save and restore file permissions and owner:group... this is for backup my server... I have one problem in my server and file permissions and owner:group, mess up.. For this reason i need found one way to secure this aspect of the server... Thanks! (1 Reply)
Discussion started by: joangopan
1 Replies

4. Shell Programming and Scripting

A script to find dir, delete files in, and then del dir?

Hello!! I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory: drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies

5. Shell Programming and Scripting

Find the number of files older than 1 day from a dir

Hello All, I need to write a script/command which can find out the number of .csv files residing in a directory older than 1 day. The output should come with datewise (means for each date how many files are there). I've this command, but this command gives the total number of files. It's... (10 Replies)
Discussion started by: NARESH1302
10 Replies

6. Shell Programming and Scripting

Need a script to move the files from one dir to other other dir

Need a script to move the files from one dir to other dir and at the same time it has to read the log in the source dir. Please help me ASAP. (4 Replies)
Discussion started by: viswanathkishor
4 Replies

7. Shell Programming and Scripting

KSH - Find paths of multiple files in CC (dir and sub-dir))

Dear Members, I have a list of xml files like abc.xml.table prq.xml.table ... .. . in a txt file. Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file. Please help me with the script or command to do so. ... (11 Replies)
Discussion started by: Yoodit
11 Replies

8. Shell Programming and Scripting

Script to move all files in a dir into a certain dir

Hello all, I'm very new to shell scripting and need quite urgently to do this thing for my student job. I have a directory called "vectors" with a bunch of files all named ".vector". also i have for each of those files a directory with the name . I now want to move each of those *.vector files... (2 Replies)
Discussion started by: sherresh
2 Replies

9. Red Hat

Find and Chown all files in a DIR except for Root

RHEL 6.3 Could someone tell me how to use the find and chown command to replace all files in a directory owned by user1 (for this example) and replace with user1:group1? Most importantly I dont want to change any files owned by root. I recently used the following command but it changed the root... (4 Replies)
Discussion started by: gps1976
4 Replies

10. UNIX for Beginners Questions & Answers

Find and removing the old files and zipping the files using shell script

Hi, I am trying to removing the old files which were older than 10 days and same g zipping the files using the shell script. script was return as follows. find /jboss7_homes/JBOSS7/SKYLIV??/SKYLIV??_CRM/jboss-eap-7.0/standalone/log -mtime +10 -type f | xargs rm -f find /cer_skyliv??/log... (6 Replies)
Discussion started by: venkat918
6 Replies
JH_GENERATEORBITDIR(1)						    Javahelper						    JH_GENERATEORBITDIR(1)

NAME
jh_generateorbitdir - Creates and populates an orbit dir used by pde-build for third-party jar files. SYNOPSIS
jh_generateorbitdir [debhelperoptions] [--orbit-dir=dir] [orbit-dep[...]] DESCRIPTION
jh_generateorbitdir is a javahelper program that handles creation of an orbit dependency dir. This directory has to be populated with non- eclipse jar files. However, eclipse refers to these jars by their "symbolic name". jh_generateorbitdir can extract this name from the jar's manifest (provided it has the OSGi metadata) and create a symlink to it. jh_generateorbitdir will replace regular files with symlinks if they are present in the orbit dir and clash with the name of one of the orbit jars. If an orbit jar name clashes with a symlink in the orbit dir, then jh_generateorbitdir will assume that the given jar has already been symlinked correctly. In this case the jar file is still recorded in the cache (see below). jh_generateorbitdir will also check the default installation for jar files on Debian systems (at the time of writing /usr/share/java), if it cannot find the jar in the current dir. Jar files replaced by jh_generateorbitdir will be recorded so that jh_installeclipse can replace with symlinks them post install. FILES
debian/eclipse.orbitdeps List of orbit dependencies - one per line. This can be used as an alternative to passing it per command line. OPTIONS
--orbit-dir=dir Specifies the directory from where the orbit-dir is or should be created. Defauls to "debian/.eclipse_build/orbitdeps". EXAMPLE
jh_generateorbitdir --orbit-dir orbit asm3 oro Will generate a folder called orbit with two symlinks based on asm3 and oro's symbolic name. SEE ALSO
debhelper(7) This program is a part of javahelper and uses debhelper as backend. There are also tutorials in /usr/share/doc/javahelper. AUTHOR
Niels Thykier <niels@thykier.net> COPYRIGHT AND LICENSE
Copyright 2010 by Niels Thykier This tool is free software; you may redistribute it and/or modify it under the terms of GNU GPL 2. 0.43 2011-04-29 JH_GENERATEORBITDIR(1)
All times are GMT -4. The time now is 07:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy