10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
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
2. UNIX for Dummies Questions & Answers
Hi Gurus,
we are planning to clear the old log files based on the year and i need help on this and i searched in google and i came up with the scripts but i am stuck with this.
(1) wroks fine
How many files exist in based on the extension
find -type f | sed -e 's/.*\.//' | sort | uniq... (1 Reply)
Discussion started by: SeenuGuddu
1 Replies
3. UNIX for Dummies Questions & Answers
How do you delete/remove multiple files ? (5 Replies)
Discussion started by: nosuchluck
5 Replies
4. Shell Programming and Scripting
Hi,
I have a file with rows like below delimited with pipe (|)
I want to remove all the leading and trailing white space from each and every fields keeping the delimiter intact.
I have tired this
sed 's/*//g;s/*$//g'
but the result is incorrect
it is removing a whitespace from... (6 Replies)
Discussion started by: COD4
6 Replies
5. Shell Programming and Scripting
Hi
Following is an example line.
echo "192.22.22.22 \"33dffwef\" 200 300 dsdsd" | sed "s:\(\ *\ \):\1:"
I want it's output to be
200
However this is not the case. Can you tell me how to do it? I don't want to use AWK for this. Secondly, how can i fetch just 300? Should I use "\2"... (3 Replies)
Discussion started by: shahanali
3 Replies
6. Shell Programming and Scripting
i have a directory that have files that contains word "spam", how can i remove all those files which have word spam.
This code help me in searching
find ./ -type f -exec grep -l "spam" {} \;
How i will add removing option with it. If some one have good suggestion regarding searching... (2 Replies)
Discussion started by: learnbash
2 Replies
7. Shell Programming and Scripting
Hi,
Say I have this text file <copy.out> that contains a list of files/directories to be copied out to a different location.
$ more copy.out
dir1/file1
dir1/file2
dir1/file3
"dir1/white space"
dir1/file4
If I do the following:
$copy=`more copy.out`
$echo $copy
dir1/file1... (4 Replies)
Discussion started by: 60doses
4 Replies
8. Shell Programming and Scripting
Dear all,
I want to remove files older than 2 months in the /home/member directory. But except the configuration files (like .bash_profile .config/ .openoffice/ .local/ .kde/ etc..)
I have tried with the command
find . -mtime +60 -wholename './.*' -prune -o -print -exec mv {} \;
but it... (1 Reply)
Discussion started by: jamcalicut
1 Replies
9. Shell Programming and Scripting
I have a file in which I clean out a bunch of nonsense text as well as path information.
What I end up with is something like the following:
johnson.........................................................933
Where the periods represent the whitespace
The file comes out originally with... (2 Replies)
Discussion started by: roninuta
2 Replies
10. UNIX for Dummies Questions & Answers
Hello all,
I'd like to remove files which is returned by the following statement
ls -l arch*.dbf|grep "`date|cut -c5-10`" (cut -c5-10 =Mar 20)
To achive this,I tried the following statments but none worked ..
rm < `ls -l arch*.dbf|grep "`date|cut -c5-10`"`
rm `ls -l arch*.dbf|grep... (8 Replies)
Discussion started by: luft
8 Replies