Tag Info

Hot answers tagged

17

Version control system is a program like any other. You can install it system-wide or locally if you like. Read the first two lines of GIT installation instructions for example. Also, if you are going to build anything to run as normal user, you might be interested in the question about running your own programs.


17

Using find: find /tmp/ -type f -exec md5sum {} + | grep '^file_md5sum_to_match' If you searching through / then you can exclude /proc and /sys see following find command example : Also I had done some testing, find take more time and less CPU and RAM where ruby script is taking less time but more CPU and RAM Test Result Find [root@dc1 ~]# time find ...


11

Script Solution #!/usr/bin/ruby -w require 'find' require 'digest/md5' file_md5sum_to_match = [ '304a5fa2727ff9e6e101696a16cb0fc5', '0ce6742445e7f4eae3d32b35159af982' ] Find.find('/') do |f| next if /(^\.|^\/proc|^\/sys)/.match(f) # skip next unless File.file?(f) begin md5sum = Digest::MD5.hexdigest(File.read(f)) ...


11

You can try to find the relevant files with find: find /usr/something -maxdepth 1 -user antoine You can then use -exec to create a zip file from the results of find: find /usr/something -maxdepth 1 -user antoine -exec zip /tmp/file.zip {} + leave out the maxdepth if you want to recurse.


10

Mono does not support AIX. If you want to try to port Mono to AIX, you would probably want to: Turn on the manual checking of dereferences in Mono, as AIX keeps the page at address zero mapped, preventing a whole class of errors from being caught. I forget the name of the define, but it was introduced some six months ago. You would have to make sure ...


10

I usually use the -exec utility. Like this: find . -type f -exec du -a {} + I tried it both on bash and ksh with GNU find. I never tried AIX, but I'm sure your version of find has some -exec syntax. The following snippet sorts the list, largest first: find . -type f -exec du -a {} + | sort -n -r | less


9

The best way to learn AIX would be to obtain an account on a machine that's running it. Really, part of what sets AIX apart from other unices is that it's designed for high-end systems (with lots of processors, fancy virtualization capabilities and so on). You won't learn as much by running it in a virtual machine. If you really want to run AIX on your ...


9

perl may not be the most appropriate unless the IO::Pty module is installed. First, maybe you don't need anything complicated if the given-thing-that-takes-long-time (gtttlt) can work OK with pipes. mkfifo input nohup gtttlt <> input > output 2>&1 & to start the gtttlt (input from a named pipe, output to a regular file). Then you ...


8

As recommended by IBM: use lsof -i -n and look for port XY. If you want parseable output from lsof, use the -F flag and parse the output with awk. You can get pre-compiled binaries for AIX V5. I don't know if there are pre-compiled binaries for V6; if there aren't, get the source and compile it.


7

No real chance of getting AIX to run on your laptop, the best way to learn is to buy an old machine and have a go on real hardware (PPC hardware itself is quite different, different boot process etc). You should be able to find a cheap IBM workstation on eBay for a few hundred dollars, a model 275 with 4Gb RAM should be sufficient to run AIX for testing ...


7

Remember that each of the NFS client systems will determine the username by looking up the numerical UID in /etc/passwd, or your centralized user database. The NFS server only stores the UID in numerical format, and does not know about usernames. This is also true for group names vs. GIDs. In your case, serverA and serverB must have different usernames ...


7

If you're going to the expense of buying IBM pSeries servers, then generally, in broad terms, you may as well run AIX on them which is specifically crafted to drive the hardware as efficiently as possible. That goes from the hypervisor down through to the adapters. If you want to run Linux, you may as well buy xSeries hardware (in IBM terms, or Intel / AMD ...


6

An update from a colleague, which I have just tested: 12arstdyfu445!! works It seems that for some legacy reason, the password strength rules need to be adhered to within the first 8 characters of the password. I will do some hunting around to see if this is applicable to all AIX and Solaris versions, but I hadn't managed to find an answer when googling ...


6

Usually uname -m should do the trick, as should arch. The output of both of these commands will tell you the architecture for which the kernel was built. Whether this is 32 or 64 bit is usually pretty clear (x86_64 and ia64 are two possible 64-bit architectures). However, note that you could have a 32-bit kernel while running on 64-bit hardware. If you ...


6

Old school — you could use dd: dd if=A_FILE bs=1c skip=3 The input file is A_FILE, the block size is 1 character (byte), skip the first 3 'blocks' (bytes). There are other ways too: sed '1s/^...//' A_FILE This works if there are 3 or more characters on the first line. tail -c +4 A_FILE And you could use Perl, Python and so on too.


6

All you need is join join -t\, <(sort Output1.csv) <(sort Output2.csv) -or- join -t "," <(sort Output1.csv) <(sort Output2.csv) or awk awk -F, 'FNR==NR{a[$1]=$2;next}{ print $0 "," a[$1]}' Output2.csv Output1.csv


6

If you decide to install gnu find anyway (and since you indicated interest in one of your comments), you can try something like: find / -type f \( -exec checkmd5 {} YOURMD5SUM \; -o -quit \) and have checkmd5 compare the md5sum of the file it gets as argument compare to the second argument and print the name if it matches and exit with 1 (instead of 0 ...


5

Yes, you are more-or-less correct on all 3 points. PowerVM is the hypervisor. It has redundant service processors that do the work of RSA cards you'd find in the intel systems. There are 3 tiers of PowerVM each providing additional functionality on the system. (More LPARs, Partition Mobility, etc) There is no operating system to manage for PowerVM. VIOs ...


5

newgrp starts a subshell with the group you specified. So that line in your script will not finish until that subshell is done. The handling of newgrp is also different if you're using bash or ksh. ksh implements it as a built-in command that is equivalent to exec /usr/bin/newgrp [group]. So, like exec, newgrp never returns. (See some documentation here.) ...


5

The use of grep is redundant, sed can do the same. The problem is in the use of * that match also 0 spaces, you have to use \+ instead: iostat | sed -n '/hdisk1/s/ \+/ /gp' If your sed do not supports \+ metachar, then do iostat | sed -n '/hdisk1/s/ */ /gp'


5

\t on the right hand side of a sed expression is not portable. Here are some possible solutions: POSIX shell Bear in mind that since many shells store their strings internally as cstrings, if the input contains the null character (\0), it may cause the line to end prematurely. echo "something" | while IFS= read -r line; do printf '\t%s\n' "$line"; done ...


5

svmon e.g. # svmon size inuse free pin virtual memory 131072 114552 16520 34191 151562 pg space 655360 78472 work pers clnt other pin 30911 6 0 3274 in use 83264 31288 0 or vmstat as already shown ...


5

Quoting verbatim from https://uisapp2.iu.edu/confluence-prd/pages/viewpage.action?pageId=123962105 : Under linux/unix, if you remove a file that a currently running process still has open, the file isn't really removed. Once the process closes the file, the OS then removes the file handle and frees up the disk blocks. This process is complicated ...


5

Not that I know of. At least, the obvious ways won't work: you can't unset a readonly variable or remove the readonly attribute with typeset +r. This goes for all the ksh variants that I've seen, and for bash, but there are apparently ksh versions such as on AIX 4.3 that allow typeset +r (which zsh also allows). Technically, you can do this from outside: ...


5

You can use chpasswd The chpasswd command administers users' passwords. The root user can supply or change users' passwords specified through standard input. Each line of input must be of the following format. username:password Only root users can set passwords with this command. Example 1: echo username:password | chpasswd Example 2: ...


5

If you were on Linux, you could simply use: date -d @1381260225 Or you could use awk: echo "1381260225" | awk '{print strftime("%c",$1)}' Or Python: python -c "import datetime; print datetime.datetime.fromtimestamp(1381865497)" Or Perl: perl -e 'print(scalar(localtime(1381865497)), "\n";' However none of these solutions are available on a stock ...


5

If you're sure that end_time is always greater than start_time, you can use Perl like so: export start_time=06:07:25 export end_time=07:02:08 perl -e ' ($h1,$m1,$s1) = split /:/,$ENV{start_time}; ($h2,$m2,$s2) = split /:/,$ENV{end_time}; $delta_h = $h2 - $h1; $delta_m = $m2 - $m1; if( $delta_m < 0 ) { $delta_m = $delta_h-- * 60 + $m2 ...


4

You can change the timezone with smitty, the reason it wants a reboot is because services like cron are running with the old settings. In order to avoid the reboot you would need to, change the timezone with smitty log off, log on again, and switch to a new root session that session will have the right timezone now you need to stop every single service ...


4

mount (1) requires a mount point to exist in order to mount something. So, if /mnt/subdir1 doesn't exist an attempt to mount something there will fail. I was not aware that you could mount over a mount point that is mounted from NFS, although you can do it with other file systems (e.g. you can mount /usr under / and /usr/local under /usr, so I guess that ...


4

I think you need to familiarize yourself with the Rosetta Stone. Back in the day, when I needed to interact with other Unices (often in extracting data to migrate to Linux), I'd use the guide to try to find equivalent commands or as a starting point to locating the right files to do my job. There are more than enough differences to keep you on your toes. ...



Only top voted, non community-wiki answers of a minimum length are eligible