10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I need to replace xml version='1.1' with xml version='1.0' in all xml files under /app/jenkins/ in all dir and sub dirs in my CentOS VM, I tried below command but it didn't help, looks like I'm missing a character somewhere.
grep -rl "xml version='1.1'" . | xargs sed -i 's/"xml... (2 Replies)
Discussion started by: mahesh Madpathi
2 Replies
2. Shell Programming and Scripting
i need to find a portable way to go through multiple directories to find a file.
I've trid something like this:
find /opt/oracle/diag/*/alert_HH2.log -printordinarily, i can run the ls command and it will find it:
/opt/oracle/diag/*/*/*/*/alert_HH2.log
The problem with this approach is... (3 Replies)
Discussion started by: SkySmart
3 Replies
3. Shell Programming and Scripting
I am trying to find a way to move files into corresponding date files.
i=0
while read line
do
array="$line"
(( i++ ))
done < <(ls)
cd $(echo ${array})
echo ${array}}
pwd
#cd "$(array}"
] || mkdir 2015
cd "2015"
] || mkdir 02-February
] || mkdir 03-March
] || mkdir... (10 Replies)
Discussion started by: newbie2010
10 Replies
4. Debian
Hi,
The other day i installed a PHP based CMS (modx) on my shell account and noticed that i couldn't delete any of files/dirs it created after.
Also, i noticed that all that stuff is owned by username-www instead of username.
I tried chown, chmod and using a PHP script to do the same wti... (4 Replies)
Discussion started by: pentago
4 Replies
5. Shell Programming and Scripting
Hi,
I'm writing some start of day checks for my work. I want to check some dirs for files that have been created longer than 10 mins ago and not been transfered. I've already used a find command to write a list of files that meet this criteria to a log called sod.log
i.e. ... (1 Reply)
Discussion started by: elcounto
1 Replies
6. Shell Programming and Scripting
Hi,
I have a script to retrieve data files from server and store them in a directory on local disk. The script runs everyday as cron job. But now those files are too many so my boss wants me to put the files into different directories base on dates.
Those files look like this:
... (4 Replies)
Discussion started by: leafei
4 Replies
7. UNIX Desktop Questions & Answers
using: find . -type f -print|xargs -li "string", how do I limit the dated directories (2010-7-14, 2010-7-13,etc.) to just 2009 & 2010 years of directories to search. We go back to 2004 in our archives, way too many files. (3 Replies)
Discussion started by: MJThom713
3 Replies
8. Shell Programming and Scripting
Hi everybody.
I need a command to print the absolute path of files which name starts always with a pattern (MOD03), independently on where they are in the filesystem.
I have tryedls -ld ${INPUTPREFIX}/*/*/* | grep MOD03 | awk '{ print $8 }'but I have to use "/*/*/*" in this case to have the... (5 Replies)
Discussion started by: canduc17
5 Replies
9. Shell Programming and Scripting
Hey all.. This should be simple but stoopid here can't get head around it! I have many directories, say 100 each with many files inside. I need a script to traverse through the dirs, find most recent file in each dir and add it to a tar file.
I can find the files with something like
for... (1 Reply)
Discussion started by: bobdung
1 Replies
10. Shell Programming and Scripting
I have a directory which is /home/mark/files/ , inside this particular I have a bunch of filles (see examples below)
TST_SHU_00014460_20090302.txt
TST_SHU_00016047_20090302.txt
TST_SHU_00007838_20090303.txt
TST_SHU_00056485_20090303.txt
TST_SHU_00014460_20090303.txt... (2 Replies)
Discussion started by: fierusbentus
2 Replies