10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need a script which should watch a directory for a file with specific directory.
If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column.
The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies
2. Shell Programming and Scripting
I used rm * and it deleted the files in the directory but gives and error message for unsuccessful subdirectory deletion.
"rm: cannot remove 'DirectoryName': Is a directory"
I dont want to explicitly get the above error.
What are the modifications I have to do in the rm command? (3 Replies)
Discussion started by: duplicate
3 Replies
3. Shell Programming and Scripting
In Solaris, and other distros without the "watch" command, use the following code watch for files added to a directory.
#!/bin/bash
while ;
do
watchdir=/var/tmp
newfile=$watchdir/.newer
touch $newfile
find $watchdir -newer $newfile;
touch -a -m $newfile;
... (10 Replies)
Discussion started by: os2mac
10 Replies
4. Shell Programming and Scripting
Hi,
I have more than 1000 directories under one directory (lets says under /home/).
Sub directories are like A1 to A100,B1 to B100 etc..
Here my problem is I need to find the files older than 10 days in the directories which starts with A*.
I tried some thing like this which is not... (2 Replies)
Discussion started by: shhrikanth
2 Replies
5. Shell Programming and Scripting
Hi!
In our current directory there are around 35000 files.
Out of these a few thousands(around 20000) start with, "testfiles9842323879838".
I want to count the number of files that have filenames starting with the above pattern. Please help me with the command i could use.
Thank... (7 Replies)
Discussion started by: atechcorp
7 Replies
6. Solaris
Hi,
I'm searching for a pattern 'java' under a directory but it is returning all the files containing 'java', but I want to have only distinct files not all.
please help (2 Replies)
Discussion started by: b.paramanatti
2 Replies
7. UNIX for Advanced & Expert Users
Hi all,
This is actually more for my lazyness then anything else, but I think others might find it useful to use as well. Basically this is what I am trying to achieve...
In my ubuntu home dir under Downloads is where firefox saves everything by default, now I know that you can manually... (3 Replies)
Discussion started by: STOIE
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have to copy a set of files abc* in /path/ to /path1/ as abc*_bkp.
The list of files appear as follows in /path/:
abc1
xyszd
abc2
re2345
abcx
..
.
abcxyz
I have to copy them (abc* files only) into /path1/ as:
abc1_bkp
abc2_bkp
abcx_bkp
..
. (6 Replies)
Discussion started by: new_learner
6 Replies
9. UNIX for Dummies Questions & Answers
Hi, everybody
I want to know hot to watch changes on a dir, for example if someone changes a file inside it, with an script. I've tried using md5sum and then diff, sadly with no success.
I use md5sum for single files, but doesn't work for directories. The idea is take a snapshot with md5sum,... (4 Replies)
Discussion started by: piltrafa
4 Replies
10. Shell Programming and Scripting
I have 20 files in a direcotry like BARE01_DLY_MKT_YYYYMMDD. The MKT differes for all these files but the remaining syntax remains the same for a particular day. If I am checking for today I need to make sure that there are 20 files that start with BARE01_DLY_MKT_20060720. How can I write a... (31 Replies)
Discussion started by: dsravan
31 Replies