Search Results

Search: Posts Made By: mr_bold
1,630
Posted By mr_bold
cat file_list | [script to print last some characters]
Hello guys,

I have a list of files. For example:

/disk1/mediator_home/tmp/ntest/TSFILE00.8256.GGG1-U.0908250009.unp.20090824P8.is...
18,610
Posted By mr_bold
Thank you very much, There aren't any...
Thank you very much,

There aren't any subdirectory.
There are many files so I can't directly use wc or awk.

wc -l * | tail -1
-bash: /usr/bin/wc: Argument list too long


I can do it by...
18,610
Posted By mr_bold
Combination of find -xargs & wc -l
Dear all,

I have to calculate sum of record count of files of the specified directory.
First I tried the following way which prints one or more outputs.
How can I sum of this output?

find...
19,872
Posted By mr_bold
Thank you very much :cool:
Thank you very much
:cool:
19,872
Posted By mr_bold
How to sort lines by substring
Dear all

There is a file which contains the following formatted files. I need to sort it by substring(strings after dot) in order to process efficiently.
Please give me any idea how to sort it.
...
1,971
Posted By mr_bold
Thanks all, I found out it. ...
Thanks all,

I found out it.

[testuser@localhost proc]$ find -type d | sed "s#^.##" | sed "s#/##" | sed '/^$/d' | sort -k1 -u | awk '$1<=20080403'
20080401
20080402
20080403
1,971
Posted By mr_bold
Thanks penchal_boddu, I could do it by...
Thanks penchal_boddu,

I could do it by writing few lines of code, but I wanted to do it in one line. I wrote by the following way, it works, except for new line & space character. How can I remove...
1,971
Posted By mr_bold
While finding compare the result with given string
Hello,

There are directories named by "yyyyMMdd" format. The one directory name is given and I should find & print that directory & its previous days directory names if exist.

For example:
...
2,601
Posted By mr_bold
Uncertainty on disk usage report
Hi all,

My system is running on RHEL4. I've just deleted 2 huge tablespaces from Oracle.
Then I saw the disk usage. The report by df differs from the du.

Do you know why they shows...
79,378
Posted By mr_bold
Thank you very much :)
Thank you very much

:)
79,378
Posted By mr_bold
How to quickly show Nth line from the file
Hi all,

How can I quickly show Nth line from the huge file(at least more than 15GB)? I used the following script but seems slower.

See 2717298 th line.

head -2717298 data0802.dat | tail -1...
25,301
Posted By mr_bold
Thanks ohagar, That works :)
Thanks ohagar,

That works :)
25,301
Posted By mr_bold
Read file then grep the line
Dear all,

I am reading a file that has 1 column. While reading I must find the line references from the another file. The following shell doesn't works.

Please help


#!/bin/bash
while read...
27,780
Posted By mr_bold
Thank you very much
Thank you very much
27,780
Posted By mr_bold
List files with full path
Hi all,

How to save file full name to a file. I tried the following but don't know to include path name.

[mediator@localhost tst]$ ls -l | awk '{print $9}' > outputfile.dat...
23,117
Posted By mr_bold
How to configure iptables
Dear all,

I need to configure iptables to prevent not allowed incoming intra-net & internet access.
There're Oracle 10g r2, and vs-ftp runing on the server.
I need to allow certain ip...
10,666
Posted By mr_bold
Thank you very much. I will try them now.
Thank you very much. I will try them now.
10,666
Posted By mr_bold
RHEL 4 U5 - Server unexpected shutdown
Dear all,

My server has shutdown frequently.
It is AMD64, OS is RHEL 4 U5.
I've seen the system log, before the shutdown occured:

Jul 29 04:28:56 localhost kernel: EDAC k8 MC0: general bus...
15,271
Posted By mr_bold
Thanks, You're right. I need to mount more space.
Thanks, You're right. I need to mount more space.
15,271
Posted By mr_bold
How to extend /tmp size?
Dear all,
I wanna to extend my /tmp size. I deleted the all files of /tmp but it still shows there's no more space on it.
The OS is Red Hat Enterprise Linux AS release 4 (Nahant Update 5).
...
5,815
Posted By mr_bold
Thank you for all, this script works. ...
Thank you for all, this script works.

#!/bin/sh

if [ "$(ps -ef | grep "FileCollector.jar -id7" | wc -l)" -gt 1 ]; then
# process is running
echo "process is running"
else
#...
5,815
Posted By mr_bold
Check the process before run or not
Dear all,

I am writing a shell that check the java application already run. If it is not run before it will run next commands.

ps -ef | grep java

Thank you :)
1,626
Posted By mr_bold
Thanks to all. Also this code works. ...
Thanks to all.

Also this code works.

if awk 'BEGIN{if ('$FILES_COUNT' >= '$MIN_FILE_COUNT'); else exit 1}'
then
echo true
else
echo false
fi
1,626
Posted By mr_bold
Do commands depending on the comparision
Dear all,

I am writing a shell, that do commands if the file count reaches 96. I wrote a shell, but doesn't work


#!/bin/sh
MIN_FILE_COUNT=96;
GET_PATH=/home/collection/data1; export...
4,379
Posted By mr_bold
User permission
Hi all,

I created testuser. by following command.
/usr/sbin/adduser -n test -d /disk05/collections/GET/testdata/
and then set its password by following command.
passwd testuser

When I...
Showing results 1 to 25 of 31

 
All times are GMT -4. The time now is 07:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy