Search Results

Search: Posts Made By: codemaniac
Forum: Solaris 08-21-2013
2,729
Posted By codemaniac
GNU grep (/usr/sfw/bin/ggrep) is generally...
GNU grep (/usr/sfw/bin/ggrep) is generally installed at system in /usr/sfw/bin.
Forum: AIX 07-29-2013
8,368
Posted By codemaniac
you can use redirection to send the command...
you can use redirection to send the command output to a file instead of the standard output (that is your display device).

top -b > top_output.txt
863
Posted By codemaniac
you can generate high entropy passwords using...
you can generate high entropy passwords using openssl.

openssl rand -base64 6

see the openssl man page for more details.
8,193
Posted By codemaniac
you can see the GMT time with the -u option in...
you can see the GMT time with the -u option in date.

date -u

man date..

-u Display (or set) the date in Greenwich Mean
Time (GMT-universal time), ...
10,890
Posted By codemaniac
okay if you are not using GNU find then i guess...
okay if you are not using GNU find then i guess maxdepth will not be available.

You can do something like below using prune to not descending to and directory other than "dir".
find...
4,004
Posted By codemaniac
try using printf. :) prstat 1 1 | awk...
try using printf. :)

prstat 1 1 | awk '{printf ("%10s %10s %10s %10s\n",$1,$2,$9,$10)}'
1,382
Posted By codemaniac
okay, the below cron entry will get file once...
okay, the below cron entry will get file once daily at 8:30 pm.

30 20 * * * /home/test/scripts/example.sh
1,124
Posted By codemaniac
something like below you want? sed...
something like below you want?

sed 's/oldfiler.host.box.network.com/newfiler-003.host.box.lp3/g;s/mainwh02.host.box.network.com/newfiler-003.host.box.lp3/g' filename

it will replace the...
1,586
Posted By codemaniac
what have you tried so far? just a hint: you...
what have you tried so far?

just a hint: you can extract the last character of a string by something like below.

echo $string| awk '{print substr($0,length($0),1)}'
3,538
Posted By codemaniac
Just some thoughts, according to history...
Just some thoughts, according to history manpage..

"!" character starts a history substitution in bash.

and "#" is The entire command line typed so far.
1,382
Posted By codemaniac
Do you want your command/script to run only @8:30...
Do you want your command/script to run only @8:30 pm once daily?
1,382
Posted By codemaniac
# minute (0-59), # | hour (0-23), # | ...
# minute (0-59),
# | hour (0-23),
# | | day of the month (1-31),
# | | | month of the year (1-12),
# | | | | day of the week (0-6 with...
2,048
Posted By codemaniac
first of all please check where the .profile file...
first of all please check where the .profile file is located for the unix user.

. /path/to/the/profile
10,890
Posted By codemaniac
the gnu find has a maxdepth option that lets you...
the gnu find has a maxdepth option that lets you restrict the search to the current directory.

can you try something like below.

find . -maxdepth 1 -mtime +30
2,048
Posted By codemaniac
cron has very limited idea about your shell...
cron has very limited idea about your shell environment, hence it would be better if you can set your profile again at the beginning of your script.

try editing your it.sh and add your...
1,683
Posted By codemaniac
technically the assignment statement is valid,...
technically the assignment statement is valid, but why you would want to re-assign already defined environment variable?
1,683
Posted By codemaniac
you can easily store the content of the variable...
you can easily store the content of the variable $ARBORDBU in another variable e.g. var with the below assignment.

var=$ARBORDBU
10,890
Posted By codemaniac
you can find the files older than 30 days and...
you can find the files older than 30 days and archive them with the below commandline.

find . -mtime +30 | xargs tar cvzf archive.tar

remove files older than 30 days with the below commandline....
1,459
Posted By codemaniac
if you are trying to search for fixed strings,...
if you are trying to search for fixed strings, you can use fgrep which is more faster than grep.
fgrep (grep -F in linux) is fixed or fast grep and behaves as grep but does not recognise any...
10,692
Posted By codemaniac
You can use find, someting like below on your...
You can use find, someting like below on your shell script.

find . -ctime +3-print | xargs -I '{}' rm {}

this will delete files older than 3 days.
Forum: Fedora 10-16-2012
2,879
Posted By codemaniac
You need to run ssh with more verbosity to...
You need to run ssh with more verbosity to understand why authentication is failing.
ssh -vvv username@host

On the server end, look in the logs. /var/log/auth.log will give you a pretty good...
Forum: Fedora 10-16-2012
2,879
Posted By codemaniac
what does it say when you do the below on A. ...
what does it say when you do the below on A.

ssh user@localhoost
13,890
Posted By codemaniac
the function is a recursive one (calls itself)...
the function is a recursive one (calls itself) hence you need a if condition in the function body so that it can be terminated when a certain condition is met(e.g when $c reaches a specific value).
Forum: Solaris 10-15-2012
3,343
Posted By codemaniac
You can use the find command, may be something...
You can use the find command, may be something like below

find /sys/logs -ctime +1 | xargs -I '{}' mv {} /backup

Please test with some sample files before you go . :)
2,515
Posted By codemaniac
try sed "s/Winston (UK) Wong/7000/"...
try
sed "s/Winston (UK) Wong/7000/" tmp0.txt
Showing results 1 to 25 of 111

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