Tagged Questions
0
votes
2answers
43 views
linux + how to identify if file is pointed by link/s
I create new file called - 192.9.200.1
touch 192.9.200.1
then I create new link that will be pointed to 192.9.200.1 file
ln -s 192.9.200.1 file
so finally I get:
ls -ltr /tmp
...
0
votes
2answers
45 views
linux + delete duplicate IP's from file
what the best way to remove duplicate IP's from file
I use the command:
sort file | uniq
but I am not sure if this is the best way , maybe I missed something?
remark: my file contain two ...
0
votes
2answers
89 views
re-create new link and remove the old link on one command
according to ln manual page:
man ln
-f, --force
remove existing destination files
so as I understand if I want to re-create new link to some destination directory/file
I can ...
8
votes
3answers
1k views
How do I sleep for a millisecond in bash or ksh
sleep is very popular command and we can start sleep from 1 second
# wait one second please
sleep 1
but what the alternative if I need to wait only 0.1 second or between 0.1 to 1 second ...
0
votes
3answers
102 views
grep + Regular Expressions to match uniq number
My target is to verify if $FILE is a backup file ( backup file ended with xxxx.xx.xx.xx number
Example of backup files
ls /etc/VRTSvcs/conf/config
main.cf.17Dec2012.09.10.14
...
0
votes
1answer
75 views
Linux/Solaris verification ( after hostname change ) in files according to hostname rule
According to the following Perl command
( this command part of ksh script )
I can replaced old hostnames with new hostnames in Linux or Solaris
previos_machine_name=linux1a
...
0
votes
1answer
252 views
linux\solaris + print specific date format from file
subject - print file date on solaris as format: yymmdd ( yy - year , mm - month , dd - day )
on Linux machine I type the following command in order to get: file date
as the following:
ls -l ...
0
votes
2answers
62 views
linux/solaris + how to verify OS (linux / solaris ) creation date
Please advice – how to verify OS (linux / solaris ) installation creation date
which file/packages/other – can be good indication when the operation system was created/installed ?
For example
I ...
1
vote
3answers
205 views
linux/solaris kill many proccess with one command
Is it possible to kill all find process with one command?
I do not want to kill each process as kill -9 25295 , kill -9 11994 , etc.. Rather, what I want is a simple way or command that kill all find ...
0
votes
1answer
104 views
perl + sed + remove lines that start with “#”
please advice
I have linux and solaris machines, and I need command that work on both OS
I use the following perl line in order to remove all lines that start with "#"
why perl command not work ,
...
0
votes
0answers
40 views
solaris + manipulate lltconfig command
I work on Solaris machine ( Solaris 10 ) , machines - de1a and du1b
regarding lltconfig command
is it possible to view from the lltconfig command only one device (NIC as e1000g0 ) and not all list ...
1
vote
1answer
85 views
solaris + match the network device name according to IP address
how to find the device name as ( e1000g2 , e1000g3 , etc ) according to his IP address on Solaris machine
for example
ifconfig -a | grep 10.106.134.133
inet 10.106.134.133 netmask ...
1
vote
1answer
61 views
tar + tar not open all files
When I want to view the following tar file , then tar show the following three files
from /var/tmp
tar tvf fix.tar
install.sh
/usr/cti/apps/swp/dir/script1.sh
...
0
votes
1answer
180 views
expect script + how to perform case in expect script
the following expect script target is to print the hostname name from linux/solaris machine
and according to hostname results expect script will run linux.ksh or solaris.ksh script
...
0
votes
1answer
119 views
expect script + write “if” in expect script
please advice what's wrong with my exepct syntax ( I run expect in ksh script on Solaris 10 machine )
I want to verify if OS is linux
so if it true the expect check if prompt is "#" or ">"
and ...
0
votes
2answers
2k views
expect + how to install expect on solaris
subject - install expect on solaris in order to write expect scripts
details from my machine:
uname -a
SunOS 5.10 Generic_139555-08 sun4v sparc SUNW,Netra-T5220
I installed Solaris machine ( ...
1
vote
1answer
72 views
tput command + bold specific strings in file
please advice how to bold the "Date & Time" numbers from the following file with tput command ( I have Solaris machine)
for example I want to bold only the "24-09-2009 16:17:45" etc for all other ...
1
vote
2answers
905 views
expect script + expect miss the send string + delay issue
I write the active.ksh script (based on expect) in order to login automatically to some Solaris machine and execute the hostname command (login to virtual IP in order to verify which hostname is the ...