10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
:wall::wall::wall:
Hi I have horrible script below, need help in renaming ls -l output into new filename format:
Desired output:
cp -pv original_path/.* newDirectory/owner_of_file.%dd%mm%y.file_extension.first_8_characters_of_original_filename
localuser@localuser:~ vi... (3 Replies)
Discussion started by: wolf@=NK
3 Replies
2. Shell Programming and Scripting
Hi guys can you please help me with a script to find files with one row/1 line of content then move the file to another directory my script below runs but nothing happens to the files....Alternatively Ca I get a script to find the *.csv files with "wc -1" results = 1 then create a list of those... (5 Replies)
Discussion started by: Dj Moi
5 Replies
3. Shell Programming and Scripting
I have to retain only 1 day files in my system an I have to delete all the other files which are older than 24 hrs. Please let me know the option I have to give in the find -mtime command. (3 Replies)
Discussion started by: rajesh8s
3 Replies
4. Shell Programming and Scripting
Hi,
I need a script that can search a word "Error" in last 10 Hrs generated logs in /log/App1 and /log/App2 folder..
Note these directories have massive log files ...actually our application generate 100 Log files of size 2MB in just a min so script must be fast enough to cater this I... (9 Replies)
Discussion started by: Mujtaba khan
9 Replies
5. Shell Programming and Scripting
hi all,
I need to find files in a directory which are older than N hrs...
n can be 1,2,3,.. etc
when tried using -mtime option it gives all the files in the last 24hrs from the current time .
please help me out on this ..
thanks (8 Replies)
Discussion started by: sparks
8 Replies
6. UNIX for Dummies Questions & Answers
I wanted to know what command should I use to see the files created in last 2 hours in a given directory.
I know to see the files changed in last one day I can use this:
find /admin//dump -type f -ctime -1 -print | xargs ls -lt|pg
However I am not getting what should I use if I wanted tol... (4 Replies)
Discussion started by: rsonakiya
4 Replies
7. Shell Programming and Scripting
Hi all,
I am trying to figure out a method to flag an error if a file has not arrived in a certain directory within 24 hrs of the last one arriving.
I am currently writing the time to a file when a file is recieved. I then want to check for a new file reguarly but flag an error if it has been... (3 Replies)
Discussion started by: pxy2d1
3 Replies
8. Shell Programming and Scripting
Hi gurus
I am currently using the below mentioned grep to find timestamp of last generated log file.
touch -t $time_search dummy
ecust_time_stamp=$(find . -name 'eCustomerCME*' -newer dummy -type f -exec ls -ltr {} \; | tail -1 | awk ' { print $6,$7,$8 } ')
I calculate... (3 Replies)
Discussion started by: ragha81
3 Replies
9. Shell Programming and Scripting
Hi,
I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.
Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies
10. UNIX for Dummies Questions & Answers
Is there a way of setting the TZ for New Zealand. I do not mind if it is only for the logged in session.
It makes it hard to understand when files or CRON jobs have run when the time is set to GMT0.
Any help will be appreciated.
;) (1 Reply)
Discussion started by: jagannatha
1 Replies