10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hii,
Could someone help me to append string to the starting of all the filenames inside a directory but it should exclude .zip files and subdirectories.
Eg.
file1: test1.log
file2: test2.log
file3 test.zip
After running the script
file1: string_test1.log
file2: string_test2.log
file3:... (4 Replies)
Discussion started by: Ravi Kishore
4 Replies
2. UNIX for Dummies Questions & Answers
I Want to remove all the sub-directories except latest five in any given TGTDIR.
Is there a way to do so without making a cd to TGTDIR?
I have tried the following but not worked.
Thank you.
rm -rf `ls -t $TGTDIR | awk 'NR>5'` (20 Replies)
Discussion started by: Devendra Hupri
20 Replies
3. Shell Programming and Scripting
Hi,
I am not too familiar with Unix scripting but I have to write code to find all the files under all the sub directories under a parent directory of unix location and move them to the corresponding Windows location.
For eg: I have \home\sreenu\Files\
Under neath this I have multiple sub... (3 Replies)
Discussion started by: raj.sreenu
3 Replies
4. Shell Programming and Scripting
How to list all Subdirectories and files with its full path in a parent directory? (1 Reply)
Discussion started by: johnveslin
1 Replies
5. Shell Programming and Scripting
Dear all,
I have a dir structure like
main_dir
At_nn Ag_js Nf_hc ....
mcd32 mgd43... mcd32 mgd43... mcd32 mgd43...
and each subdir (e.g. mcd32, mgd43) contains files.
Now, i... (15 Replies)
Discussion started by: yogeshkumkar
15 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
Hello my friends,
I need to write a simple shell bad file :D that search and delete a file it's name 'Microsoft.txt' in the current directory and its subdirectories?
So can you help to guide me how i can write this shell, Just give me the beginning :o thank you. (1 Reply)
Discussion started by: Net-Man
1 Replies
8. UNIX for Advanced & Expert Users
Hi
I have a problem. One of the directories in /var, on one of my servers, has filled up with loads of files. I have tried to list the directory to see what is in it, but the 'ls' command just hangs. Same thing happens when I try to use 'rm' to remove files from that directory.
I can see what... (2 Replies)
Discussion started by: m_smith
2 Replies
9. 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
10. 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