03-11-2012
Thanks for the comments Methyl and Dave.
The answer by Dave doesnt work. it simply removes the content of the tobedeted.txt.
The actual dir structure is like
in the main_dir
there are subdirs like AAA, BBB, CCC, ....
inside AAA there are subdirs like aa1, aa2, aa3, ...
inside aa1 there are files like AAA_aa1_file1.txt, AAA_aa1_fileextra.txt, AAA_aa1_mod43a4.txt, ....
inside aa2 there are files like AAA_aa2_file1.txt, AAA_aa2_fileextra.txt, AAA_aa2_mod43a4.txt, ....
inside BBB there are subdirs like bb1, bb2, bb3, ...
inside bb1 there are files like BBB_bb1_file1.txt, BBB_bb1_fileextra.txt, BBB_bb1_mod43a4.txt, ....
inside bb2 there are files like BBB_bb2_file1.txt, BBB_bb2_fileextra.txt, BBB_bb2_mod43a4.txt, ....
and so on...up to many hundred of files. I managed to the get the filenames which I must delete.
e.g. the content of tobedeleted.txt is
AAA_aa1_fileextra.txt
BBB_bb1_file1.txt
BBB_bb1_mod43a4.txt
CCC_cc4_mfg54d2.txt
GGG_gg6_hd21s1.txt
and so on....
i hope there is a way!
Last edited by yogeshkumkar; 03-11-2012 at 09:49 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
How to recursively remove Ctrl M characters in files from a directory and its sub directory ?
I know unix2dos command is there but to remove in bunch of files ... ?
Thanks (7 Replies)
Discussion started by: skdp
7 Replies
2. UNIX for Dummies Questions & Answers
I need to find the largest files in a directory & it's subdirectories.
I'm not sure what options on ls -l will work to give me this. or is there another way to do this?
Thanks,
igidttam (6 Replies)
Discussion started by: igidttam
6 Replies
3. Shell Programming and Scripting
I posted a week ago regarding this scripting question, but I need to revisit and have a few more questions answered..
User cfajohnson was extremely helpful with the archive script, but clarification on my part is needed to help steer the answer in a direction that works in this particular... (5 Replies)
Discussion started by: fxvisions
5 Replies
4. Shell Programming and Scripting
I have a large list of filenames from an Excel sheet, which I then translate into a simple text file. I'd like to use this list, which contains various file extensions , to archive these files and then remove them recursively through multiple directories and subdirectories. So far, it looks like... (5 Replies)
Discussion started by: fxvisions
5 Replies
5. UNIX for Dummies Questions & Answers
If I execute the command "ls -l /export/home/abcde/dev/proj/code/* | awk -F' ' '{print $9}' | cut -d'/' -f6-8" it will list all the files in /export/home/abcde/dev/proj/code/ directory as well as the files in subdirectories also
proj/code/test.sh
proj/code/test1.c
proj/code/unix... (8 Replies)
Discussion started by: shyjuezy
8 Replies
6. UNIX for Dummies Questions & Answers
I'm trying to remove several directories which contains sun-dirs and files inside.
I used the command rm -r <dirname>
But, it always ask "examine file in directory <dirname> yes/no?" line by line.
So, i need to write "y" for every line.
How can i skip this step and remove all directories with... (9 Replies)
Discussion started by: ppa108
9 Replies
7. Shell Programming and Scripting
Hi,
I have a very big directory structure that consists of many sub-directories inside.There are around 50 ".gz" files under this dir structure.
I want to copy all the gz files alone to a seperate location.
Plz help me. (2 Replies)
Discussion started by: villain41
2 Replies
8. Shell Programming and Scripting
I need to write a script to :
list files with *.i extension in a directory and all its subdirectories + 30days old, save it in a file and then remove (2 Replies)
Discussion started by: lena keung
2 Replies
9. UNIX for Advanced & Expert Users
Hello,
I wanted to
list all files in subdirectories which are modifiled recently. need to display all files with full details like hpw it display with ls -l ( date, size,..)
Thanks
Bala (3 Replies)
Discussion started by: balareddy
3 Replies
10. UNIX for Dummies Questions & Answers
Hi, I'm currently trying to print the names of all the .txt files in the subdirectories that contain the string I'm searching.
I tried with this code, but it seems that it searches for the names that matches the string instead of searching for the string in the individual files and printing the... (2 Replies)
Discussion started by: nuclearpenguin
2 Replies
LEARN ABOUT DEBIAN
gtkdoc-mktmpl
gtkdoc-mktmpl(1) General Commands Manual gtkdoc-mktmpl(1)
NAME
gtkdoc-mktmpl -- GTK DocBook documentation generator.
SYNOPSIS
gtkdoc-mktmpl [ See below ]
DESCRIPTION
gtkdoc-mktmpl This creates or updates the template files which contain the manually-edited documentation. (A template is a simple text form
which is filled in with the description of a function, macro, enum, or struct. For functions and macros it also contains fields for
describing the parameters.)
This script reads in the existing templates, found in tmpl/*.sgml, moves these files to tmpl/*.sgml.bak, and then recreates the .sgml files
according to the structure given in the file MODULE-sections.txt.
Any new templates added, or new function parameters, are marked with FIXME so you can do a grep to see which parts need updating.
Any templates which are no longer used (i.e. they are remove from MODULE-sections.txt) are placed in the file tmpl/MODULE-unused.txt. If
they are included again later they are automatically copied back into position. If you are certain that these templates will never be used
again you can delete them from MODULE-unused.txt.
Any parameters to functions which are no longer used are separated from the rest of the parameters with the line <!-- # Unused Parameters #
-->. It may be that the parameter name has just been changed, in which case you can copy the description to the parameter with the new
name. You can delete the unused parameter descriptions when no longer needed.
EXAMPLE
See /usr/share/doc/gtk-doc-tools/examples, for a makefile.am and a configure.in example file.
AUTHOR
This manual page was written by Christian Marillat marillat@debian.org for the Debian GNU/Linux system (but may be used by others).
gtkdoc-mktmpl(1)