Category: UNIX-Unix Beginner
chmod - pass a filelist as a parameter?
hi
i have a text file which contains a list of file names (one file name per line). i would like to pass the contents of this file into chmod to change the permissions. i am having trouble getting the correct syntax for this. can someone please tell me if its possible to do this?
Read More...
Category: UNIX-Unix Beginner
redhat linux command to check version
hi all,
i need to know redhat linux version installed on a different servers.
i know uname -a or /proc/version
is any other command to know the linux version????
when we telnet to any of the linux server, the version shows very clearly like
red hat enterprise linux es release 3 (taroon update 6)
kernel 2.4.21-37.elsmp on an i686
login:
in similar way can we find same info when telnet service is not enabled?
thanks & regards,
Read More...
Category: UNIX-Unix Beginner
running unix commands remotely in windows box from unix box ?avoid entering password
i am able to run the unix commands in a windows box from a unix box through "ssh" functionality. but whenever the ssh connection is established between unix and windows, password for windows box is being asked.
is there a way to avoid asking password whenever the ssh connection is made? can i store required passwords in a file and then use that file for password prompt whenever ssh is established?
Read More...
Category: UNIX-Unix Beginner
ssh between two differnt versions
hi,
i am trying to ssh between two differnt versions on solaris boxes.
the src box has the ssh secure shell 3.1.0 on sparc-sun-solaris2.6 and destination has ssh version sun_ssh_1.0, protocol versions 1.5/2.0.
i am not trying for passwordless connection. i just want to get it working with a password before i proceed with passwordless.
i get the below error
warning: authentication failed.
disconnected; key exchange or algorithm negotiation failed (key exchange failed.).
can anyone suggest what needs to be done to get this working
Read More...
Category: UNIX-Unix Beginner
how to obtain list of users ?
how to obtain list of users found in /home/ and append it to a file.
Read More...
Category: UNIX-Unix Beginner
path in prompt line?
can anyone tell me what makes the current path appear in the prompt ?
Read More...
Category: UNIX-Unix Beginner
trim leading zero in certain column in a string
i would like to know how to trim leading zero only in certain column of of a string, example:
hdhshdhdhd000012mmmm0002abc <===== before
hdhshdhdhd 12mmmm 2abc <===== after
thanks for your help.
Read More...
Category: UNIX-Unix Beginner
redirection in unix, '<' as opposed to '>'
greetings,
when directing in unix, symbol > means saving. e.g. i can save ls command output into mama like this:
ls -f > mama
could someone give me a real example of how the opposite, i.e. symbol < is used?. could not find its counterpart in windows (i seem to learn better when i see unix's counterparts in windows upon which i depended for ages)
thanks
Read More...
Category: UNIX-Unix Beginner
user permission
hi all,
i created testuser. by following command.
code:
/usr/sbin/adduser -n test -d /disk05/collections/get/testdata/
and then set its password by following command.
code:
passwd testuser
when i login to system by testuser, it enters everything is ok.
the problem is how to set permission to this user not do anything out of its home directory. it is /disk05/collections/get/testdata/
how can i do this permission?
Read More...
Category: UNIX-Unix Beginner
how to compare the difference between a file and a folder??
hi,
i have a .txt file which has to be compared with a folder and print the difference to some other .txt file.
i did try with the diff command..i mean
diff /tmp/aaa/bbb.txt /space/aaa/bbb/
/***bbb.txt contains all the files names which may or may not exist in the folder bbb..so i need to capture the files that does not in the folder***/
it gives me an error mesg saying..
diff : /space/aaa/bbb/ /bbb.txt : no such file or directory.
can you help me out with some other command?
thanks,
Read More...