Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: Daniel Gate
5,624
Posted By Daniel Gate
-bash: syntax error near unexpected token `('
// AIX 6.1

I am getting a syntax error below. Please advise what to be corrected. :confused:


runmqsc CERN.$(echo `hostname` | cut -d'.' -f1 | tr '[:lower:]' '[:upper:]').$(echo $environment...
982
Posted By Daniel Gate
Thank you so much!
Thank you so much!
982
Posted By Daniel Gate
Crontab - password prompting
// Red Hat Enterprise Linux Server release 6.7

I wanted to pass the password, but when I execute this cron, it stops at Password: prompt.

Please advise on how to fix the error. Thank you for...
2,311
Posted By Daniel Gate
Much appreciated! (( ($(stat -c"%s-" "$f"...
Much appreciated!
(( ($(stat -c"%s-" "$f" /P2/backup/"$f") 0) > 0 )) && cp "$f" /P2/backup/ works absolutely charming.
2,311
Posted By Daniel Gate
Compare file size and then copy/overwrite
// Redhat

I have this code working, but need to add one more qualification so that I don't overwrite the files.

#!/bin/sh
cd /P2/log/cerner_prod/millennium/archive/
for f in *
do [ -f...
1,764
Posted By Daniel Gate
Thank you!!! It works charming. Appreciate it!
Thank you!!!
It works charming. Appreciate it!
1,764
Posted By Daniel Gate
cp -n or cp -no Flag doesn't work. Which Flag...
cp -n or cp -no Flag doesn't work.
Which Flag should I use?

Try `cp --help' for more information.
cp: invalid option -- n
Try `cp --help' for more information.
[root@]# cp --help
Usage: cp...
1,764
Posted By Daniel Gate
Cp & skipping exiting files
// Redhat

I am running a cron with cp every 15 minutes.

cp /p2/arch/log/* /p2/bkp

What I need is to not to copy the file again if the filename already exists under /p2/bkp

The reason is...
1,946
Posted By Daniel Gate
SFTP function
I have FTP function:

FTPfunction ()
{
integer sw=4
ftp -niv <<- ! > $FTPLOG 2>&1
open $1
user $2
$3
put /tmp/ptdata.csv
close
bye
!


but, I need to use sFTP and port 22.
Can you...
4,364
Posted By Daniel Gate
Maxuproc and limit
// AIX 6.1 & Power 7 server

I have maxuproc set to 16384.

lsattr -El sys0 -a maxuproc
maxuproc 16384 Maximum number of PROCESSES allowed per user True

What is the maximum number of...
788
Posted By Daniel Gate
Thank you so much!!! It works great.
Thank you so much!!! It works great.
788
Posted By Daniel Gate
Thank you! Would it be possible to convert...
Thank you!

Would it be possible to convert the size into MB and then sort them by descending order of the file size?


-rwxrwxrwx 1 root system 5602212 Nov 09 2013 ...
788
Posted By Daniel Gate
Ls -al / du
// UNIX 6.1

I have /opt directory growing so fast, and /opt has a number of sub-directories.

Is there a way to display files larger than 100 MB on /opt and its sub-directories?

I like to...
911
Posted By Daniel Gate
Truly appreciate great solutions! Thank you...
Truly appreciate great solutions! Thank you again!
911
Posted By Daniel Gate
Extracting segments
I have queue.txt with the following contents:


Queue [APSAUTOCODER] on node ...

description :
type : local
max message len : 104857600
max...
7,091
Posted By Daniel Gate
It shows: jdoe time_last_login=1412251621 ...
It shows:
jdoe time_last_login=1412251621

What I want is as the output is:

jdoe Wed Dec 31 19:00:00
.....

or even better


jdoe 12/31/2013 19:00:00
....


Please advise.
7,091
Posted By Daniel Gate
Thank you!! Is it possible that we can display...
Thank you!! Is it possible that we can display the username and time on one row so that I can have a better output?

right now, I am getting like:


Wed Dec 31 19:00:00 1969Wed Dec 31 19:00:00...
7,091
Posted By Daniel Gate
Can't find string terminator "`" anywhere before EOF
// AIX 6.1

What I am trying to accomplish is to display the user name and the last login date and time in one line:


for usrlist in $(cat alluser.txt)
do
$usrlist
perl -e 'print scalar...
1,552
Posted By Daniel Gate
Sorry for the lack of explanations: If I try...
Sorry for the lack of explanations:

If I try this:

while read q1 q2 q3
do [ "$q3" ] || { q3=$q2; q2=""; }
/usr/lib/lpd/pio/etc/piomkjetd mkpq_jetdirect -p 'hplj-4000' -D pcl -q "$q1"...
1,552
Posted By Daniel Gate
RudiC & Corona688, It works charming except...
RudiC & Corona688,

It works charming except one error:

0782-310 Usage:
mkvirprt -A AttachmentType
mkvirprt [ -A AttachmentType ] -d QueueDevice -n Device
-q...
1,552
Posted By Daniel Gate
Passing three variables to loop and error
I have many printer queues to be created in AIX 6.1. I can create printers with this line:


/usr/lib/lpd/pio/etc/piomkjetd mkpq_jetdirect -p 'hplj-4000' -D pcl -q 'emg1' -D ps -q 'emg1ps' -h...
1,045
Posted By Daniel Gate
With any of these, is it possible to skip the...
With any of these, is it possible to skip the files with the same filesize in the destination node? It will be great to save time for the copy as to there are a number of files, which takes a long...
1,002
Posted By Daniel Gate
It gives me the same output with 10.6.2.2.
It gives me the same output with 10.6.2.2.
1,002
Posted By Daniel Gate
awk - issue to get the right IP
On AIX 5.3 and AIX 6.1, I have this script for checking printers being pingable or not.


for i in `lsallq`
do
echo "Queue Name: " $i
echo "----------------------------------------"
...
1,045
Posted By Daniel Gate
I have ssh set up between the two nodes, so I...
I have ssh set up between the two nodes, so I prefer this method.
I don't see the parent directory /lms on the command line.
What do we do with /lms ? Please advise.
Showing results 1 to 25 of 233

 

Featured Tech Videos

All times are GMT -4. The time now is 08:20 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy