Unix iTOps Tube

Wednesday, May 2, 2012

How to specify Java System Properties in UNIX?

I am setting up Kerberos authentication and this is one of the steps:



1. Open the JBoss startup script.

2. Add the following Java System Properties

-Djava.security.krb5.conf=/disk01/kerb/krb5.conf

-Djavax.security.auth.useSubjectCredsOnly=false



I added these 2 lines and it works in a Windows environment. But it doesnt work in AIX.



What is the format to specify Java system properties in AIX?



My current JBoss startup script is as follows:

#!/bin/sh

USER_MEM_ARGS="-Xms256m -Xmx256m -XX:PermSize=64m -XX:MaxPermSize=256m -Xss256k

-XX:+DisableExplicitGC"

export USER_MEM_ARGS

/u01/dctm/shared/jboss4.2.0/bin/run.sh -c DctmServer_MethodServer -b 0.0.0

.0 $JAVA_OPTIONS





Search and delete

A file(example viv.txt) contains a n number of rows like


Code:


1,2,3,4,5,6,7,8

11,22,33,44,55,66,77,88

1,3,9,7,8,5,2,6,4


Requirement:

If number "5" exist in the sixth position then it should delete the whole line.like this it should check for all rows in a file(viv.txt)

.



please help on this.




LSBrightSlider: Add Brightness Slider To iOS Lock Screen [Cydia]

Jailbreaking your iPhone, iPod touch or iPad not only opens the device up to several useful tweaks, but also a lot of appearance enhancements. The Cydia store is full of themes and fonts that let you make cosmetic changes to your iDevice, while utilities and tweaks add or change functionality of...
Read more

Related Articles:


  1. SliderWidth: Change The iOS Lock Screen Slider Size & Text [Cydia]

  2. Get iOS 5.0 Lock Screen Camera Button On iOS 5.1 With Redire [Cydia]

  3. Get An Invisible iOS 5.1 Lockscreen Camera Slider On Any iPhone Or iPod Touch [Cydia]





Disable iOS Notification Center While Running Full-Screen Apps [Cydia]

Some time back, we covered a Cydia tweak by the name of DisableNC, which allowed jailbroken iPhone, iPad or iPod touch users to avoid accidentally pulling down the Notification Center while playing games. DisableNC is basically an SBSettings toggle, which is added to the SBSettings panel, and can...
Read more

Related Articles:


  1. Kill All Background Apps From iOS 5 Notification Center [Cydia Tweak]

  2. Set Any Photo As Notification Center Background In iOS 5 [Cydia Tweak]

  3. QuickTweet: Post Twitter Updates From iOS Notification Center [Cydia]





CloneSpy Helps You Free Disk Space By Identifying Duplicate Files Based On Name & Data

Some users randomly store files on their computers, which may result in having multiple copies of the same files at different locations. This is especially the case when we download files such as music, videos, documents, photos etc., from the internet, not knowing if we already possess a copy. It...
Read more

Related Articles:


  1. Duplicate Commander Finds Duplicate Files Based On File Data

  2. Treeviz: Analyze Disk Space Usage Through 7 Different Tree-Based Data Structure Visualizations

  3. How To Empty Dropbox Cache (Hidden Deleted Files) To Free Disk Space





Gifture For iPhone: Create GIF Animations, Apply Filters & Share, Instagram Style

The popular photo sharing service, Instagram, has had such a huge impact on the development environment for iOS, that there are many apps which copy Instagram's functionality, while another large contingent of apps borrow the basic idea behind it, but switch a key component with something else....
Read more

Related Articles:


  1. Flixel: Create Animations, Apply Effects & Share With Others [iPhone]

  2. Create And Share GIF Animations From Your iPhone Using GifBoom

  3. HeyCheck For Android & iPhone: Apply Effects & Filters To Local, Facebook & Instagram Photos





Use Siri To Search & Download Images From The Web With JpgToSiri [Cydia]

Not that Siri isn't already pretty useful, but for those who feel it could have been better in some aspects, there are many Cydia tweaks that enhance the talking assistant’s abilities. If you have a jailbroken iPhone 4S, or any other device with access to Siri (through SiriPort, for...
Read more

Related Articles:


  1. Make Siri Say Funny Things With iJokes For Chatbot/ Siri [Cydia]

  2. Chat With Siri & Improve Your General Knowledge [Cydia Tweak]

  3. SiriSports: Get NBA, NHL & MLB Scores/ Fixtures From Siri [Cydia]





Control Google Music Playback From Chrome Toolbar

If you use Chrome and love listening to your favorite tracks on Google Music, then you should give GoogleMusic For Chrome a try. This nifty little extension adds a button to your toolbar that, when clicked, reveals controls for playing, pausing, and skipping to the next song within a pop-up. You...
Read more

Related Articles:


  1. Control Music Playback For YouTube, Google Music, Rdio & Others From Chrome Toolbar

  2. Control Grooveshark, Pandora & Other Music Playback From Chrome Toolbar

  3. Video Controller: Control YouTube Playback From Chrome Toolbar





OpinionCloud Creates A Word Cloud To Summarize YouTube & Flickr Comments [Chrome, Firefox]

Comments on popular services like Flickr and YouTube can be quite useful when you want to find out what the crowd thinks about a particular video or photo, but at the same time, too many comments can make things complicated, especially if they span multiple pages. OpinionCloud, a Chrome extension...
Read more

Related Articles:


  1. Replace YouTube Video Comments With Those From Facebook [Chrome]

  2. Search & Sort YouTube Comments And Remove Spam [Chrome]

  3. Read Comments On YouTube Without Losing Video Playback Focus [Chrome]





Preview PDF Files In Windows Explorer Without Changing Default PDF Viewer

Adobe Reader is undoubtedly one of the best PDF file viewers out there (Adobe is the company behind the format, after all), but the problem with Adobe PDF Reader is that it is not a lightweight application. Low -end PCs often take a lot of time while rendering PDF documents within Adobe Reader, and...
Read more

Related Articles:


  1. How To Change Default Picture/Image Viewer In Windows

  2. ImageGlass: Feature-Rich Alternative To Default Windows Photo Viewer

  3. Open Documents In Google Docs Viewer By Default In Firefox





Bartender Adds A Hidden Toolbar To Unclutter The System Menu Bar [Mac]

Although Mac OS X menu bar lets you quickly access frequently used applications and their different functions, it doesn't provide you with an option to manage as well as, hide/unhide all menu bar applications and system utilities' icons. If you often struggle finding the application icon in...
Read more

Related Articles:


  1. XMenu Adds Mac Global Menu And Favorite Folders To Menu Bar

  2. Shortcuts To Tray Adds A Customizable System Tray Shortcut Menu

  3. Easily Access Tools Menu When Menu Bar Is Hidden In Firefox





Ambientweet Is An Intuituve, Hotkey-Controlled Twitter Client For Mac

Not all Twitter users are the same, and similarly, not all Twitter clients are made to work the same way. For the Twitter users who tweet very often and are as glued to their timeline, clients like Tweetdeck might be the right choice. However, those users who don't treat their Twitter feed like...
Read more

Related Articles:


  1. Syrinx: Twitter Client With Keyboard Shortcuts & Tweet Filters [Mac]

  2. Itsy: Simple Twitter Client That Supports Growl Notifications [Mac]

  3. TweetyPop: An Intuitive, Beautiful Twitter Client For The iPad





Preference-Aware Music Events Tracking App Bandsintown Concerts Comes To Android

Bandsintown is a popular Facebook app that keeps the music enthusiasts apprised of the upcoming live concerts and performances of their favorite music bands/artists. An iOS variant of the app has been around in the iTunes App Store for quite some time, while the Android version has just hit the...
Read more

Related Articles:


  1. Track Concerts Of Your Favorite Music Artists With GigBeat [Android]

  2. Popular Preference-Aware News App Zite For iPad Now Available For iPhone [Update: And Android]

  3. AppGenius: Security & Preference-Aware App Discovery Tool That Covers All Major Android Stores





Create Custom Keyboard Shortcuts & Reassign Function Keys On Mac [Tip]

For avid computer users, keyboard shortcuts make the usage of an app extremely convenient, and when they're missing, it is annoying, to say the least. For many apps, a function, and a highly useful one at that, may lack a hotkey, but there is a simple workaround for it in OS X. If the apps...
Read more

Related Articles:


  1. SFunKey: Map Keyboard Function Keys To Easily Perform Multiple Actions

  2. Remap And Reassign Your Android Device’s Keys With ButtonRemapper

  3. Create Your Own Custom Keyboard for Android Devices





xShredder: Overwrite Free Space & MFT, Wipe Disk, Shred Folders & Files

When you delete a file, it goes to the Recycle Bin. To remove it completely from your hard drive, you have to delete it from the Recycle Bin as well. However, even after you have completely removed it from your hard disk, one can easily recover the deleted file using a powerful data recovery...
Read more

Related Articles:


  1. Find Files And Folders That Take Up Most Space In Your Hard Disk

  2. How To Empty Dropbox Cache (Hidden Deleted Files) To Free Disk Space

  3. Quickly Check Disk Space Usage Of Folders And Sub-Folders With SizeOnDisk





Metanota: View, Create & Sync Notes From Your SimpleNote Account [Mac]

If you're an avid SimpleNote user, you might be a little disappointed with the fact that its Mac app is still under wraps. As far as Apple’s ecosystem goes, you can only check notes on your iPad or iPhone. If you're not good at waiting, and do not like to use the service's web...
Read more

Related Articles:


  1. Flick Note For Android Lets You Create Notes & Sync With Simplenote

  2. ResophNotes – Take Plain Text Notes And Sync With Simplenote

  3. Syncpad Webnotes – Sync Your SimpleNote Notes Across Chrome Browsers





How To Backup iPhone SAM Activation Ticket To The Cloud via Cookie [Cydia]

To those who like to stay up to date with the latest news regarding the jailbreak world, SAM is nothing new by any means. You must also have heard of the new method through which it has become possible to carrier-unlock any jailbroken iPhone on any baseband and firmware, in a few simple steps...
Read more

Related Articles:


  1. Messages2PDF: Backup iPhone SMS & iMessage Threads On Email [Cydia]

  2. Backup And Restore MS Office & Windows Activation Tokens

  3. Backup Your Cydia Tweaks & Preferences Using OpenBackup For iOS





Crusper: Perform Simple Tasks By Moving Mouse Cursor Over Screen Corners

Moving the cursor around and clicking programs and files to access them is quite convenient, but if you were looking for a rather quick way to perform simple computer tasks, then you should give Crusper a try. This application has been developed to use screen corners and mouse movements to perform...
Read more

Related Articles:


  1. Unlimited Mouse Unlocks Your Cursor To Move Around Screen Edge

  2. Use Mouse Gestures To Perform Tasks In Windows Explorer With Gest

  3. Launch Any App Or Script By Moving Mouse Over Left Edge Of Screen [Mac]





BusyFlow: Manage All Your Cloud-Based Apps From One Place For More Effective Collaboration [Web]

Multiple productivity apps allow you to manage your projects and tasks more effectively, but switching between all of them can be a cumbersome process. BusyFlow is a workspace that creates the easiest way for you and your team to collaborate and manage all your cloud apps, such as DropBox, Google...
Read more

Related Articles:


  1. Changelog Droid – Updated Changelogs For All Your Android Apps In One Place

  2. Ericsson Apps: Android App Suggestions & Usage Monitoring In One Place

  3. Producteev Brings Its Cross-Platform, Cloud-Based Task Management App To Android





SaveGram For Android: Batch-Download Photos From Any Public Instagram Profile

If the reputation of the popular photo-editing and sharing sensation, Instagram, was impressive among iOS users, the debut of its Android client in the Google Play Store has been nothing less than a fairy tale. First, the app almost instantly shot up to the numero uno spot among Android apps from...
Read more

Related Articles:


  1. PhotoBox!: View, Batch Download/Upload & Untag Yourself From Facebook Photos [Android, iOS]

  2. das Image: Download Photos From Instagram, Picasa, 500px & Flickr [WP7]

  3. PlayGram: Browse Personal, Popular & Nearby Instagram Photos On Android





InsomniaX: Disable Sleep On Idle Or Lid Close While On Battery Or AC [Mac]

MacBooks, like all other laptops, go to sleep when their lids are closed. The benefits of this simple function are multiple; you can close the lid and leave your MacBook with the assurance that it will be locked, and should you have forgotten to power it off, the power consumption will be...
Read more

Related Articles:


  1. Sleep Preventer Disables Sleep, Hibernate, Dimmed Display & Screensaver

  2. Disable Annoying Battery Full Audio Notification Sound On Epic 4G

  3. Disable Auto Sleep To Prevent Laptop From Sleeping In Ubuntu





grep only from a range of columns

Hello all,



I have a .csv file with over 100 columns. I would like to grep for a pattern only searching within a range of those fields, and print the entire line. For example: grep a pattern from columns $47-$87, but print fields $0 - $100



Thanks!




Understanding perl statement

can someone help me how to interpret this line?







my ($class, $hashref) = @_;



my $portfolio = {};



if ($hashref->{portfolio_id}) {
($portfolio) = GEmySQL->get ("select * from portfolio where portfolio.id=$hashref->{portfolio_id}");

}

===============



Question: how do you read statement four? From left to right? or Right to left?




Recover/Reset Sun Java System Server Console password

I am administering a Solaris 10 server that I have root password for but need to get to the system server console. The password has been 'forgotten'.

I've tried changing it in /var/opt/mps/serverroot/admin-serv/config/admpw and local.conf with the current hashed password in /etc/shadow for a user there. This was unsuccessful.

I've also tried /usr/sbin/mpsadmconfig -ser <server:port> -u <having it read the admpw file for the current username and password > -setadminp <new password>

but I get an error message: Status = -1 Task -setadminpwd failed: null



Can someone suggest what I'm doing wrong or if there is a better/easier more effective way to do this? I need to copy over the LDAP files from this system to a new one being set up.

Thank you!

UPDATE: have found the plain text version of the password in /var/opt/mps/serverroot/admin-serv/config however, this password is not working as well.




Tcl script for seaching a string ignoring white spaces

Hi ,



I want to search a string in a file ignoring white spaces in TCL.



My string is as follows



Ouput-Maps " 1 1 1 0 " 1



i am doing following

set a [exec grep [ {"Output-Maps[]*1[]*1[]*1[]*0[]* " }1 abc.log}]



but it is not working.

What is the wrong with the tcl script



Thanks

Gouranga









set a [




how to use if condition with sed command in BASH

Urgent help with bash scripting



1- i am using grep to find a string called: tinker panic 0 in a file /etc/ntp.conf

if the string is not there, i want to add the strings in /etc/ntp.conf file in the first line of the file. if not do nothing or exit.



2- also i want to add # in front of the following lines in /etc/ntp.conf only if # is not there.





Code:

#server 127.127.1.0 # local clock#fudge 127.127.1.0 stratum 10



Here what i have so far, but not working properly:





Code:

#!/bin/bash#const='tinker panic 0';if [ -e /etc/ntp.conf ] ; thenfound = 'grep "$const" /etc/ntp.conf' >/dev/null 2>&1 if [ "$found" -eq 0 ] ; then echo "not found" ; sed -i.bak '1 i\tinker panic 0' /etc/ntp.conf fifi

Thank you in advance.




Weird Error moving a file

Hi,

We are running into very weird error on AIX. Target directory exists on NFS.



We have one script runs every 5 mins on our system. This script is running for 5 years for now without any issuess.



Followig is the snapshot of the script :




Code:


  stmt_cnt=$(ls -1 ${1}/${2}|wc -l)

  if [ ${stmt_cnt} -ne 0 -a ${stmt_cnt} -lt 501 ]; then

    out_str="${out_str}\n$(date +"%Y%m%d%H%M%S"): Moving ${stmt_cnt} \"${2}\" statements from ${1} to ${3}\n"

    find ${1} -name "${2}" | sort -t"_" +7n +8n | xargs ksh -c 'mv $* '"${3}" foobar


Recently, mv command started failing only few occasions. Intrestingly, it is successful in the second run after failing in first run.



Following is the Error.




Code:


Usage: mv [-I] [ -d| -e] [-i | -f] [-E{force|ignore|warn}] [--] src target

  or: mv [-I] [-i | -f] [-E{force|ignore|warn}] [--] src1 ... srcN directory


Any guesses ? Appreciate pointers.




What is wrong with the the tcl script

Hi All,



I am searching for two string in the .log file

The strings are



Active Flop-Maps "0 0 1 0 1" 1

and

Ouput-Maps " 0 0 1 1 0" 2



It should search in the file ignoring white spaces .Tell me what is wrong with this script.



The tcl script is as follows



proc proc2 {arglist} {

set header {}

set i 0;

foreach a $arglist {



if {[string compare {" "} $a]} {

append header "\[\]\*" $a



}

}

set trimmed [string trimleft $header '\[\]\']

set trimmed1 [string trimleft $trimmed *]

return $trimmed1

set matches [exec grep{trimmed1} abc.log]

puts $matches

}



proc2 "Active Flop-Maps 0 0 1 0 1 0" 1

proc2 "Ouput-Maps 0 0 1 1 0" 2



Thanks in advance.

--Saraswati



---------- Post updated at 01:40 PM ---------- Previous update was at 01:38 PM ----------



If i will change the Active Flop-Maps 0 0 1 0 1 0" 1 to Active Flop-Maps 0 1 1 1 1 0" 1 it shouldn't match




Backup file

Im a fairly new linux user and im trying to learn how to do a backup shell script. i have this so far,




Code:


#! /bin/bash

backup_files="/home/clint/music"

dest="home/clint/backups'

day=$(date +%A)

hostname=$(hostname -s)

archive_file="$hostname-$day.tgz"

tar czf $dest/$archive_file $backup_files

echo "finished"


and im getting 2 errors:


Code:


line 8 expected eof while looking for matching `"'

line 9:syntax error: unexpected end of file


any help would be greatly appreciated




Unix Solaris server breached

what approach can be taken on how you can investigate a reported breach and confirm whether the breach occurred or not. As of now it cannot be confirmed if the breach occured but its been reported that some key system files have been deleted.