aix

Automating sftp using IBM AIX(UNIX) shell script

你离开我真会死。 提交于 2019-12-08 12:18:00
问题 I am trying to automate my SFTP command using a UNIX shell script but for some reason it doesn't work. Here is my code as below. Please share your thoughts/insights. #This ftp script will copy all the files from source directory into the local directory. #!/bin/sh HOST='sftp.xyz.com' USER='ABC' PASSWORD='123' SRC_DIR='From_Src' TRGT_DIR='/work/' FILE='abc.txt' sftp -u ${USER},${PASSWORD} sftp://${HOST} <<EOF cd $SRC_DIR lcd $TRGT_DIR get $FILE bye EOF echo "DONE" When I try executing the

AIX: Why does throwing an exception abort multithreaded code?

家住魔仙堡 提交于 2019-12-08 12:00:29
问题 We get an abort when a C++ exception is thrown when running code compiled with -pthread. Platform: AIX 5.3 technical level 8 Compiler: gcc 3.4.6 Linker: AIX linker 1.65.2.4 Test Code: // exception.cpp #include <iostream> class MyException { public: MyException(){} virtual ~MyException(){}; }; void gTest() { throw MyException(); } int main() { try { gTest(); } catch(MyException const & ex) { std::cout << "exception was caught" << std::endl; } return 0; } $ g++ exception.cpp $ ./a.out exception

qrencode - Segmentation fault (core dumped)

帅比萌擦擦* 提交于 2019-12-08 09:43:42
问题 I have made a working program that generated an image given a certain string. It is fully working on my Slackware 32bit distro and others distros also 32bit. Now i need to implement it on the client machine, which is an AIX powerpc. It compiled without any problem, and seems to work (every other function works and gives correct results), except when i call these 2 functions "QRcode_encodeString" and "QRcode_encodeData". It keeps giving me Segmentation fault. You can assume my main() only line

Delete old log files in AIX

扶醉桌前 提交于 2019-12-08 06:45:18
问题 I am trying write a script to delete old log files in path \var\log\applog\nmon in my AIX system. We usually get this alerts that the file system is almost full and all we do is go to the path and delete old log files. So basically what i am looking for is the script that i can schedule in corn job . This script should keep logs for two months and delete the rest . Again there are these two files i don't want it to be deleted . Named: .profile and .sh_history I tried this command : find ./My

CPAN shell runs out of memory. How can I give it more memory on Unix?

时光毁灭记忆、已成空白 提交于 2019-12-07 09:48:50
问题 I'm getting an Out of memory! message for all installs. I've never used cpan before and I'm not really sure how it works. I did a ulimit on the /.cpan directory and it resulted in unlimited. Here's what I'm looking at: [/usr/bin]# perl -MCPAN -e shell Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.7602) ReadLine support available (try 'install Bundle::CPAN') cpan> install Term::Readline CPAN: Storable loaded ok Going to read /.cpan/Metadata

static compilation of proftpd on AIX

谁说我不能喝 提交于 2019-12-07 07:38:59
问题 I'd like to compile proftpd on AIX to make it deployable on other server without having to reinstall all gnu lib library on each server. I already manage to compile it dynamicaly, but I can't manage to get it compile with the option LDFLAG="-Wl,-static" like advise in the official proftpd documentation. here the config.log error I get This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which

Perl Program to efficiently process 500,000 small files in a directory

不想你离开。 提交于 2019-12-07 07:16:21
问题 I am processing a large directory every night. It accumulates around 1 million files each night, half of which are .txt files that I need to move to a different directory according to their contents. Each .txt file is pipe-delimited and contains only 20 records. Record 6 is the one that contains the information I need to determine which directory to move the file to. Example Record: A|CHNL_ID|4 In this case the file would be moved to /out/4 . This script is processing at a rate of 80,000

How can I generate call graphs for Perl modules and scripts?

落爺英雄遲暮 提交于 2019-12-06 13:04:30
I have a bunch of Perl scripts and Perl modules given to me by someone. I have a driver program that tests all these scripts and modules. I want to generate a call graph and see the flow. Is there something available for Perl for doing this? I'd like something like pycallgraph (for python). I am running all this in AIX. Simon Cozens tells you how to do it in Profiling Perl on Perl.com . He uses a combination of Devel::DProf and GraphViz . 来源: https://stackoverflow.com/questions/1270477/how-can-i-generate-call-graphs-for-perl-modules-and-scripts

How to see what /bin/sh points to

别等时光非礼了梦想. 提交于 2019-12-05 18:11:36
I was reading about the differences between /bin/sh and /bin/bash and came across this interesting question/answer: here I made a comment to the answer asking this same question in my title to which he replied with an updated answer: How can you find out what /bin/sh points to on your system? The complication is that /bin/sh could be a symbolic link or a hard link. If it's a symbolic link, a portable way to resolve it is: > % file -h /bin/sh > /bin/sh: symbolic link to bash If it's a hard link, try > % find -L /bin -samefile /bin/sh > /bin/sh > /bin/bash I tried this and had trouble so I

static compilation of proftpd on AIX

跟風遠走 提交于 2019-12-05 17:16:48
I'd like to compile proftpd on AIX to make it deployable on other server without having to reinstall all gnu lib library on each server. I already manage to compile it dynamicaly, but I can't manage to get it compile with the option LDFLAG="-Wl,-static" like advise in the official proftpd documentation. here the config.log error I get This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was generated by GNU Autoconf 2.61. Invocation command line was $ ./configure LDFLAGS=-Wl,-static -