Go Premium for a chance to win a PS4. Enter to Win

x

Unix OS

32K

Solutions

18K

Contributors

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.

Share tech news, updates, or what's on your mind.

Sign up to Post

Few days back any mail related command ( mailx, mail ,mpack  ) stopped working from one sudo id .
in the logs i get error as dsn=5.6.0, stat=Data format error
but this happens with only one sudo ID-sudo1@my_hostname
another id -sudo2 works fine with any of the mail command

sudo su sudo1
mailx -s "Test mail" someone@example < /tmp/test.file
/home/sudo1/dead.letter... Saved message in /home/sudo1/dead.letter
where from=sudo1@my_hostname
message fails to sent


sudo su sudo2
mailx -s "Test mail" someone@example < /tmp/test.file
where from=sudo2@my_hostname
message successfully sent and received.

Not getting why with one prefix it is sent and other fails ... ?
0
Independent Software Vendors: We Want Your Opinion
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

I'm not even sure I can do this, but I want to have a script that ssh's to another server and creates a tar file on the remote server.  Is that even possible?  Here's what I have been working with, which isn't very much because I can't figure out how to make it work.

Thanks in advance for any help!
David

#!/usr/bin/ksh

server=$1

ssh $server 'tar cvf $server.logs.tar.gz /opt/bmc/Patrol3/log/Patrol*'
0
Hello  Experts ,
 
I am ssh to a server to change password .  sudo passwd sr185218 (where sr185218 is user)  . I am able to fire the command manually and no error but while trying to run same command from shh getting error i.e. not able to change password on AIX Machine .

ssh logs and error is given below
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++debug1: Next authentication method: password^M^M
sr185218@ibm5403's password: ^M
debug1: Authentication succeeded (password).^M^M
debug1: channel 0: new [client-session]^M^M
debug1: Requesting no-more-sessions@openssh.com^M^M
debug1: Entering interactive session.^M^M
debug1: Sending environment.^M^M
debug1: Sending env LANG = en_US^M^M
debug1: Sending command: /home/sr185218/sr185218.sh^M^M
Error changing password for "sr185218".^M
Changing password for "sr185218"^M
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0^M^M
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0^M^M
debug1: channel 0: free: client-session, nchannels 1^M^M
Transferred: sent 2088, received 3648 bytes, in 0.0 seconds^M^M
Bytes per second: sent 44153.9, received 77142.5^M^M
debug1: Exit status 6^M^M
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Could you please advice ...
0
I wrote the attached code with the intention to get 42 as the output but I instead get an asterisks (*) I know that 42 is the ACII value of an asterisk. Please look at my code and see something I might have missed. The program is in C using the <unistd.h> library, I have to use the unistd.h and not the stdio.h for this code.

[code]
#include <unistd.h>

void      ft_putchar(char c)
{
      write(1, &c, 1);
}

void    ft_putnbr(int nbr)
{
    write(1, &nbr, 1);
}

void      ft_ft(int *nbr)
{
      *nbr = 42;
}

int      main(void)
{
      int a;
      int *ptr;
      char c;

      a = 7;
      ptr = &a;
      ft_ft(ptr);
    ft_putnbr(a);
      ft_putchar('\n');
}
/code]
0
I have a file "tobesplitted.xls" and it has 10 columns(column A, Column B,....) I need to split that in to two files....first file containing only the column A and the second file containing the rest of the columns...

so i should get two files "splittedfilecolumA.xls" and "Splittedfilerestofcolumns".

I also want to merge two files again "splittedfile(containing Column A and Column A1)" with "Splittefilerestofcolumns.xls".

Hope i have made my requirement clear.

Appreciate if this can be done in unix
0
hi,

when i searched below command
zgrep -C20  'account is persisted'  crm-java_crm23.log.20171025.gz

i saw one match and then 20 lines before and 20 lines after


but all 41 lines are so much clutterred to my eyes i cannot hardly figure out which i s match which are before 20 lines set wheich are 20 lines after set

how to indent and how to give a empty space between each of those 41 lines and also preferably double line space just before and after match
how to change these settings permanently?
please advise
0
grep -n "go" demo_text
5: * e - go to the end of the current word.
6: * E - go to the end of the current WORD.
7: * b - go to the previous (before) word.
8: * B - go to the previous (before) WORD.
9: * w - go to the next word.
10: * W - go to the next WORD

http://www.thegeekstuff.com/2009/03/15-practical-unix-grep-command-examples/

what is the meaning of above line numbers?
i am not clear on it. can you please advise
0
zgrep -C20  'account is persisted'  crm-java_crm23.log.20171025.gz

how to see in above grep 15 lines before grep match and 15 lines after grep match



how to see in above grep 30 lines before grep match and 30 lines after grep match

how to see in above grep 30 lines before grep match

how to see in above grep 30 lines after grep match

how to see in above grep exact match line

please advise
0
hi,

i am going through below link
http://www.thegeekstuff.com/2009/03/15-practical-unix-grep-command-examples/

what is dfference between below lines
zgrep 'account is persisted'  crm-java_crm23.log.20171025.gz
zgrep -C20  'account is persisted'  crm-java_crm23.log.20171025.gz
zgrep "account is persisted"  crm-java_crm23.log.20171025.gz
grep 'account is persisted'  crm-java_crm23.log.20171025

why the time stamp of file and search result inside is different?
please advise
0
hi,

In grep statements what is difference bewteen below two

grep RPT|O|EntityBean filename
vs
grep RPT|M|EntityBean file name

what ids R what is P what is T what O what is M

Please advise
0
Important Lessons on Recovering from Petya
LVL 11
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Hello,

We are running  jfs2 file system on redhat 7, but I am not sure how many journals are configured.  Is there a command that I can use to check?
0
Hi Team,

I need to know the difference between using single bracket , double bracket , open and close parenthesis in a if condition in UNIX script and mainly the use of ;  after the if condition .

example
num=10

if [ $num -eq 10 ] ;
then
   echo "number is equal to 10"
else
  echo " number is not equal to 10"
fi

if [[ $num -eq 10 ]] ;
then
   echo "number is equal to 10"
else
  echo " number is not equal to 10"
fi

if (( $num -eq 10  ))
then
   echo "number is equal to 10"
else
  echo " number is not equal to 10"
fi
0
does 755, 777(user, group, everyone) vary from file say xyz.txt and directory say abc?
or same concept for both file and directory
if 755 means give whoever accessing(like users like me or John or Mike  etc) file  (xyz.txt)/directory(abc) partial access ?

if 777 means give whoever accessing(like users like me or John or Mike  etc) file  (xyz.txt)/directory(abc) complete access ?
please advise
0
i,

i am going through below link

https://www.petefreitag.com/item/426.cfm
when to use fgrep and when to use grep ?
are there any advantages, disadvantages on over other?
please advise
0
I have accidentally Rename more than 100 files in one Folder in Unix  like

File_Namee to   July_2016_FIle_name  Like all the file prefixed to same String "july_2016_"   How can I Reverse this action through Script?

Thank you Very Much.
0
hi,
to learn unix and its command what are best online site, learning videos, training sites that are free available out there including some books.
please advise
0
Hi,
how to uninstall mputty or tabbled putty running on my windows machine . please advise

i like to resinstall as initially only it is asking whether to map to your putty or not asking putty path?
how to find putty path to give that path so that it takes all putty sessions automaticaly?
please advise
0
I Have modified profile lpar and vio adding new vlan but do not sea ent when check new profile , why ?

Thks
0
find / -type f -size +500M -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
find: `/boot/lost+found': Permission denied

above command gives below error
how to resolve this.

It means that it's running the find through all directories and found /boot/lost+found' to be inaccessible to the find command.
please advise
0
What does it mean to be "Always On"?
LVL 5
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Hi,

how to import saved ssessions  from putty to mputty.(i saved about 50 sessions with names like integration, systest, prod1 etc in putty which i want to transfer over to mputty without again typing host, port saved session nae etc)

How to point mputty to use putty and get data from putty?
please advise
0
There are two input files: input1.txt is the actual file, input2.txt contains count of value in column 1 as per coulmn 2 from input1.txt.
need output which remove lines from input1.txt  (output.txt for reference)


input1.txt>>
abc[1.0],partition=xyz,deployedTime=20170302T2316388270600
abc[2.5],partition=xyz,deployedTime=20160713T2040505210500
bca[2.3],partition=yxz,deployedTime=20160713T2040505210500
bca[2.4],partition=yxz,deployedTime=20160813T2040505210500
bca[1.2],partition=yxz,deployedTime=20170302T2316388270600
bca[2.4],partition=xyz,deployedTime=20160813T2040505210500
bca[2.3],partition=xyz,deployedTime=20170713T2040505210500

input2.txt>>
2 abc xyz
3 bca yxz
2 bca xyz

output.txt>> should be in below format(have to remove latest version of column 1 as per coulmn 2 from input1.txt based on deployedTime)

abc[2.5],partition=xyz,deployedTime=20160713T2040505210500
bca[2.3],partition=yxz,deployedTime=20160713T2040505210500
bca[2.4],partition=yxz,deployedTime=20160813T2040505210500
bca[2.4],partition=xyz,deployedTime=20160813T2040505210500


Need help for generic command, that will work if input file contains n number of line.
0
In our linux server we  there are 2-bond interface  has been configured.

server IP = 10.X.X.X
bond-0   = 192.X.X.X

when we try to ping  destination server IP, it was not reachable.
when we traceroute/ping  request to target server , the output getting like below
#from 192.X.X.X icmp_seq=54 destination host  UNreachable

very strange to get this kind of output.

Source should be Server IP, where as it giving us reply Bond-0,  This had some partial impact some service.
Kindly advise how to resolve this issue.
0
After running the following:

$sudo n stable

I got this version response for Node:

$ node -v
v8.6.0

I then ran:

$npm install -g @angular/cli

but got permission errors which suggested I run the command  as root.
 
So, I tried:

$sudo su
(added my password)

$npm install -g @angular/cli
but get bad sounding warnings...


Node warnings
I killed the process, but need to get Angular installed. What can I do?

I get the following error when I try and start the server, whether I am root or have exited root:

sh-3.2# ng serve
module.js:529
    throw err;
    ^

Error: Cannot find module '@ngtools/json-schema'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/models/config/config.js:7:23)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)

Is this an Old version of Node??
0
Hi,

I have a cluster with two node with this version of OS and HACMP :

pp01:>oslevel -s
7100-00-06-1216

pp01:>lslpp -l | grep cluster.es.server.rte
  cluster.es.server.rte     6.1.0.14  COMMITTED  ES Base Server Runtime

I need to update both the OS and the PowerHA version, what procedure should i follow?
On the systems they know, there is a matrix of compatibility between sap versions and OS versions?
0
Hi,

When i search on below command
ps -ef|grep zyz3abc
i see all the proceses running for zyz3abc
how to seach using particular port number(1567) to filter down more granular

 i tried

ps -ef|grep zyz3abc grep 1567
did not see to work.
please advise
0

Unix OS

32K

Solutions

18K

Contributors

Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.