Search Results

Search: Posts Made By: suigion
2,525
Posted By suigion
SSH and SFTP
remotePath=$1
fileName=$2
remoteUser=$3
remoteServer=$4

echo " if [ -r $remotePath/$fileName ]; then echo '0'; else echo '1'; fi " > temp_command.log
command1=`cat temp_command.log`
ssh...
65,857
Posted By suigion
Command to check the user's permission in UNIX ??
Hi,

What is the command to check the user's permission in UNIX ?
e.g: user in UNIX is "myuser"

The result should be number format. e.g: 755, 644, etc...

Thanks.. :)
44,722
Posted By suigion
Hi, It works!!... thanks a lot ^^ ...
Hi,

It works!!... thanks a lot ^^

-ISSUE SOLVED-
44,722
Posted By suigion
how to create folder and sub-folder in UNIX ?
Hi all,

I have the following code to check the whether the folder is exist in my system.


if [ -d /home/batch/testing ]; then echo 'folder exist'; else echo 'folder not exist'; mkdir...
2,781
Posted By suigion
The checking of folder existance is not working...
Hi all,

I have the following code:


if [ -d /home/batch/testing ]; then echo 'folder not exist'; else echo 'folder exist'; fi



The "testing" folder is not exist in /home/batch , but thhe...
2,664
Posted By suigion
File exist checking error
Hi all,

I have following code:


export USERID=user
export BATCHHOSTIP=190.113.3.324

remotePath=/home/user
fileName=redbook.txt

EXIST=`ssh $USERID@$BATCHHOSTIP 'if [ -f...
1,727
Posted By suigion
UNIX variable issue
Hi all,

Something funny happen with this code:

EXIST=`ssh batch@190.2.332.234 'if [ -f $remotePath/$fileName ]; then echo 0; else echo 1 ; fi'`
echo $EXIST


Above code will display "1". ...
5,577
Posted By suigion
OK noted. I will assign the value to the...
OK noted.
I will assign the value to the variable. But how do I get the value from the UNIX ?

Thanks..
5,577
Posted By suigion
Return value from UNIX to JAVA
Hi all,

is there any way to return value from UNIX to JAVA application.
I have my source code like this:

application.java

Runtime runtime = Runtime.getRuntime();
Process p =...
14,510
Posted By suigion
Hi ryandegreat25...
Hi ryandegreat25 (https://www.unix.com/members/302064556.html),
Thanks.. it works now... :)
14,510
Posted By suigion
if I use this code, it works fine. ssh...
if I use this code, it works fine.

ssh batch@192.168.3.222 'if [ -f /home/batch/sample.txt ]; then echo "exist" ; else echo "not exist" ; fi'

it will print out "Exist"



But if I use this...
14,510
Posted By suigion
How to set value to variable in UNIX
Hi,

I am new to UNIX. I wonder how to set value to variable in UNIX..

my code:
if [ -f /home/batch/sample.txt ]; then EXIST=$a ; else EXIST=$b ; fi'
echo $EXIST

the value of EXIST is...
23,570
Posted By suigion
Thanks mglenney... it works!! :)
Thanks mglenney... it works!! :)
23,570
Posted By suigion
How to check whether file is exist on remote server
Hi all,

I am new to UNIX Scripting. I would like to know how to check whether file is exist in remote server. I have google, but cannot find any solution that works.

Currently my code is like...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 06:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy