10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi list,
I am currently looking to develop an installation script which writes out .conf files based on existing .conf files according to variables which are set in a settings file.
For example I have a settings file like so:
ip=192.168.1.1
hosts=localAnd I want to read a file which... (3 Replies)
Discussion started by: landossa
3 Replies
2. 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
3. Shell Programming and Scripting
I know you can supply the find command with an option to find files > than N days old. Is there some way to do this to find files that are > than N hours old.
I want to do somthing like this:
find . -mtime + (now - 2hrs) -print
If not is there a way to do this with sed or awk or some... (5 Replies)
Discussion started by: BeefStu
5 Replies
4. 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
5. Shell Programming and Scripting
Hello everyone,
I have some data files, with mixed header formats. the sample for the same is:
>ABCD76567.x1
AGTCGATCGTAGTCGTAGCTGT
>ABCD76567.y1
AGTCGATCGTAGTCGTAGCTGT
>ABCD76568.x1 pair_info:898989
AGTCGATCGTAGTCGTAGCTGT
>ABCD76568.y1 pair_info:893489
AGTCGATCGTAGTCGTAGCTGT... (2 Replies)
Discussion started by: ad23
2 Replies
6. 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
7. Shell Programming and Scripting
Hi guys,
I currently use the below mwntioned grep statemen to get the timestamp of the last generated file in the directory.
(ls -ltr eCustomerCME* | grep ^- | tail -1 | awk ' { print $6,$7,$8 } ')
I need to modify this grep to search for files generated only within last 2 hrs. Can you pls... (5 Replies)
Discussion started by: ragha81
5 Replies
8. 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
9. 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
10. UNIX for Dummies Questions & Answers
Hi Everybody!
Situation:
I have a large ASCII file (for example: 1-2 Mbytes) without linebreaks (\n).
Task:
I like inserting linebreaks after all 420 digits (byte).
(pattern: *\n*\n*\n...etc.)
My problem:
How? :-)
I like using shell script or (maybe) AWK (short) program.
Please,... (2 Replies)
Discussion started by: hviktor
2 Replies