9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi,
i have a requirement to delete all the files from all the directories except some specific directories like archive and log.
for example:
there are following directories such as
A B C D Archive E Log F
which contains some sub directories and files. The requirement is to delete all the... (7 Replies)
Discussion started by: Little
7 Replies
2. Shell Programming and Scripting
Hi
My directory structure is as below.
dir1, dir2, dir3
I have the list of files to be deleted in the below path as below.
/staging/retain_for_2years/Cleanup/log $ ls -lrt
total 0
drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2
drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies
3. Shell Programming and Scripting
he following are the files available in my directory
RSK_123_20141113_031500.txt
RSK_123_20141113_081500.txt
RSK_126_20141113_041500.txt
RSK_126_20141113_081800.txt
RSK_128_20141113_091600.txt
Here, "RSK" is file prefix and 123 is a code name and rest is just timestamp of the file when its... (7 Replies)
Discussion started by: kridhick
7 Replies
4. Shell Programming and Scripting
I'm sure this has been asked many times, but a search didn't turn up a definitive best method for this (if there ever is such a thing).
I have been using rsync to back up my main data directory, but I have accumulated a large number of older backups that I don't need. All of the files I don't... (14 Replies)
Discussion started by: LMHmedchem
14 Replies
5. Shell Programming and Scripting
Hi all,
I am trying to delete last occurrence of word using sed command.
for example.
I have input like this
on a.id1 = b.id1 and
on a.id2 = b.id2 and
on a.id3 = b.id3 and
and I am expecting output like this
on a.id1 = b.id1 and
on a.id2 = b.id2 and
on a.id3 = b.id3
I just need to... (11 Replies)
Discussion started by: nsk
11 Replies
6. UNIX for Dummies Questions & Answers
grep -c 'avihai' 1.log
will give me count of 'avihai' in log
I want to have a list of files in the folder that show file name with count side by side.
Please advice (2 Replies)
Discussion started by: avihaimar
2 Replies
7. Shell Programming and Scripting
Hi Everyone,
I am looking for a simple way for replacing all the files under a directory that use the server "xsgd1234dap" with "xsdr3423pap".
For Example:
In the Directory,
$pwd
/home/nick
$ grep -l "xsgd1234dap" *.sh | wc -l
119
I have "119" files that are still using... (5 Replies)
Discussion started by: filter
5 Replies
8. Shell Programming and Scripting
i have a file called file1
cat file1
i am namish
namish lives in India
India and namish both are good.
I want to delete all the occurences of namish in one shot,if i do it with sed i guess all the lines will be deleted containing the pattern.Suggest me any idea without AWK.
Thanks... (6 Replies)
Discussion started by: namishtiwari
6 Replies
9. Shell Programming and Scripting
i have a directory "ABC" with lots of old files and sub directories in it.
the issue now is i want to delete away files which are older than 15 days in "ABC" without deleting the files in the sub directories and without deleting the sub directory.
i tried using find command but it will drill down... (2 Replies)
Discussion started by: legato
2 Replies