Starting sonar issues in linux

scmuser created the topic: Starting sonar issues in linux
Hi, when I am starttign a sonar, I am getting following error…
Any help?

Starting sonar..../sonar.sh: line 490: /usr/local/sonar-2.2/bin/linux-x86-64/./wrapper: cannot execute binary file

Tagged :

How to access windows share folder from linux

scmuser created the topic: How to access windows share folder from linux

Hi,

Can you tell me How to access windows share folder from linux?

Reagrs,
scm

scmuser replied the topic: Re:How to access windows share folder from linux

I found solution 1:

Press Alt+f2 and put following shared link such as smb://10.4.40.88/Share in the text box and Run…

scmuser replied the topic: Re:How to access windows share folder from linux

To test whether Samba is installed or not…

type following command…
testparm /etc/samba/smb.conf

Testparm will parse your configuration file and report any unknown parameters or incorrect syntax. It also performs a check for common misconfigurations and will issue a warning if one is found.

chidamla replied the topic: Re:How to access windows share folder from linux
Samba is one method.

Another method is to execute an ftp service in any Windows server and configure the Windows share drive as the home folder in the ftp service. Connect Linux server to the ftp service to transfer files. This set-up is worth it when there needs to be frequent transfer of files.

For one time transfers use, winscp tools.

Tagged :

List all the Grups and users in linux

scmuser created the topic: List all the Grups and users in linux
Hi,

How can we list our all the users in Linux?

How to list all the users created in linuz machine?

rajeshkumar replied the topic: Re: List all the Grups and users in linux

Following command will work for you….

less /etc/passwd
less /etc/group

Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Nested for loop in Linux Shell Script

scmuser created the topic: Nested for loop in Linux Shell Script

As you see the if statement can nested, similarly loop statement can be nested. You can nest the for loop. To understand the nesting of for loop see the following shell script.
$ vi nestedfor.sh
for (( i = 1; i <= 5; i++ )) ### Outer for loop ### do for (( j = 1 ; j <= 5; j++ )) ### Inner for loop ### do echo -n "$i " done echo "" #### print the new line ### done Run the above script as follows: $ chmod +x nestedfor.sh $ ./nestefor.sh 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 Here, for each value of i the inner loop is cycled through 5 times, with the varible j taking values from 1 to 5. The inner for loop terminates when the value of j exceeds 5, and the outer loop terminets when the value of i exceeds 5. Following script is quite intresting, it prints the chess board on screen. $ vi chessboard for (( i = 1; i <= 9; i++ )) ### Outer for loop ### do for (( j = 1 ; j <= 9; j++ )) ### Inner for loop ### do tot=`expr $i + $j` tmp=`expr $tot % 2` if [ $tmp -eq 0 ]; then echo -e -n "\033[47m " else echo -e -n "\033[40m " fi done echo -e -n "\033[40m" #### set back background colour to black echo "" #### print the new line ### done Run the above script as follows: $ chmod +x chessboard $ ./chessboard Above shell script cab be explained as follows:

Tagged :

List all the users in linux

rajeshkumar created the topic: List all the users in linux
List all the users in Linux

cat /etc/passwd | cut -d”:” -f1
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re: List all the users in linux
Some of other options are….

cat /etc/passwd | gawk ‘FS=”:” {print $1}’

ls /home

cat /etc/passwd | cut -d: -f 1,3,6 | grep “[5-9][0-9][0-9]” | grep “/home” | cut -d: -f1
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Execute Command from Linux to Windows machine

scmuser created the topic: Execute Command from Linux to Windows machine
Hi,
Could you please help me in my following scenario…

Problem Statement: In one windows machine, I have one application (BusinessObject) file which has to perform some kind of import jobs upon getting parameters on command line.

The command to execute this import statement in windows is:
java -jar biarengine.jar <>

As part of automation in my project, I am trying to run this command along with parameter from Linux machine. I mean to say when I fire these command from Linux machine, it should get executed in Windows machine.

My questions is: What are the way we have available on which I can fire these command and make sure these got executed in Windows remotely.
Any help on this?

kd09714 replied the topic: Re: Execute Command from Linux to Windows machine
using rsh you can trigger the command on windows box.

rsh WIN-BOX-NAME “command to execute on cmd prompt”;

Tagged :

Find files with the Linux find command

rajeshkumar replied the topic: Re: Find files with the Linux find command
This next example is similar, but here I use the -i argument to the grep command, telling it to ignore the case of the characters string, so it will find files that contain string, String, STRING, etc.:
find . -type f -name “*.java” -exec grep -il string {} \;

This command searches through the /usr/local directory for files that end with the extension .html. When these files are found, their permission is changed to mode 644 (rw-r–r–).
find /usr/local -name “*.html” -type f -exec chmod 644 {} \;

This command searches through the htdocs and cgi-bin directories for files that end with the extension .cgi. When these files are found, their permission is changed to mode 755 (rwxr-xr-x). This example shows that the find command can easily search through multiple sub-directories (htdocs, cgi-bin) at one time.
find htdocs cgi-bin -name “*.cgi” -type f -exec chmod 755 {} \;

From time to time I run the find command with the ls command so I can get detailed information about files the find command locates. To get started, this find command will find all the “*.pl” files (Perl files) beneath the current directory:
find . -name “*.pl”

In my current directory, the output of this command looks like this:
./news/newsbot/old/3filter.pl
./news/newsbot/tokenParser.pl
./news/robonews/makeListOfNewsURLs.pl

That’s nice, but what if I want to see the last modification time of these files, or their filesize? No problem, I just add the “ls -ld” command to my find command, like this:
find . -name “*.pl” -exec ls -ld {} \;
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re: Find files with the Linux find command
To perform a case-insensitive search with the Unix/Linux find command, use the -iname option instead of -name. So, to search for all files and directories named foo, FOO, or any other combination of uppercase and lowercase characters beneath the current directory, use this command:
find . -iname foo

If you’re just interested in directories, search like this:
find . -iname foo -type d

And if you’re just looking for files, search like this:
find . -iname foo -type f
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re: Find files with the Linux find command
To find all files modified on a certain date, for example, ‘2007-06-07’ the final input is:
find . -type f -newermt 2011-04-20 ! -newermt 2011-04-21

Search for files in your home directory which have been modified in the last twenty-four hours. This command works this way because the time since each file was last modified is divided by 24 hours and any remainder is discarded. That means that to match -mtime
0, a file will have to have a modification in the past which is less than 24 hours ago.

find . -mtime 0

Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Find Linux Command Collection

rajeshkumar created the topic: Find Linux Command Collection
Find files modified in the last 48 hours, and in current folder and one level below
I believe the correct command is `find -maxdepth 2 -type f -mtime -2
• maxdepth: will tell find to only search in the current folder
• type: will tell find to only list files and not directories
• mtime: will tell find to only list the files modified in the last 24 hours

To find all files modified in the last 24 hours (last full day) in a particular specific directory and its sub-directories:
find /directory_path -mtime -1 –print

To find all files with regular file types only, and modified in the last 24 hours (last full day) in current directory and its sub-directories:
find /directory_path -type f -mtime -1 –print
find . -type f -mtime -1 –print

To find all files that are modified today only (since start of day only, i.e. 12 am), in current directory and its sub-directories:
touch -t `date +%m%d0000` /tmp/$$
find /tmefndr/oravl01 -type f -newer /tmp/$$
rm /tmp/$$
The first command can be modified to specify other date and time, so that the commands will return all files that have changed since that particular date and time.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

FTP commands for Linux / Unix

rajeshkumar created the topic: FTP commands for Linux / Unix
How to Login – ftp rajesh-servers

Basic Commands
help or ? Displays a list of all FTP commands.
quit Quits the program.
! [command] Executes a shell command from within the FTP program.

Directory Commands
cd [directory] Changes to the specified directory on the remote system.
dir Displays a long listing of files on the remote system.
ls Displays a short listing of the files on the remote system.
lcd Changes the working directory on the local system.
pwd Displays the working directory on the remote system.

File Transfer Commands
get [filename] Downloads a single file from the remote system.
put [filename] Uploads a single file to the remote system.
mget [file…] Downloads multiple files from the remote system.
mput [file…] Uploads multiple files to the remote system.

Miscellaneous
ascii Sets the file type to ASCII text. This is the default.
binary Sets the file type to binary for transferring programs etc.
prompt Toggles yes/no prompts for multiple file transfers.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Various Commands to send an email in Linux

rajeshkumar created the topic: Various Commands to send an email in Linux
Sending mail
To send a message to one or more people, mailx can be invoked with arguments which are the names of people to whom the mail will be sent. The user is then expected to type in his message, followed by an ‘control-D’ at the beginning of a line.

mails -s "this is test" -a SG_COMM.sql.gz rajeshk@adobe.com < raj.txt

mailx rajesh@xyz.com < /tmp/db_reorg.log echo "This is test Subject" | mailx rajesh@xyz.com mailx -s "This is test Subject" rajesh@xyz.com < test.txt echo "This is test Subject" | mailx -c love@xyz.com -s "Join us watching Star Wars" rajesh@xyz.com

Send an email in Linux with attachment
Attach /tmp/list.tar.gz and and send it

uuencode /tmp/list.tar.gz /tmp/list.tar.gz | mailx -s "Subject" rajesh@xyz.com

Email photo.png along with a text message read from body.txt
cat body.txt; uuencode photo.png photo.png) | mail -s "Subject" rajesh@xyz.com

Attach /tmp/filelist.tar.gz and read the content of a text using /tmp/body.txt
mutt -s "Backup status" -a /tmp/filelist.tar.gz rajesh@xyz.com < /tmp/body.txt Unix command to send an email attachment or mailx command to send an email with attachment Code: uuencode file1 file2 | mail user@companyname.co.in -s "subject"

uuencode is a utility which is to be found with sharutils. make sure its installed. To check wheterh its installed or not.

which uuencode or
locate uuencode or
rpm -qa | grep sharutils

If you do not found, then you might have to install it. You need to install sharutils by folliwing commands....

Install uuencode
======================================
yum install shareutils
or
wget ftp.scientificlinux.org/linux/scientific/6.2/x86_64/os/Packages/sharutils-4.7-6.1.el6.x86_64.rpm
rpm -ivh sharutils-4.7-6.1.el6.x86_64.rpm
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :