Tag Archives: Attached Images

iptables ACCEPT & REJECT

By Lost in Cyberia

File Type: png
Hey everyone, something curious I found. I was studying up on iptables, and saw that my filter table, has it’s INPUT chain to accept all incoming packets..and then to reject all incoming packets. Am I reading this right? take a look.

I couldn’t format it properly, so I stuck it on a pastebin and attached the image

Obviously this doesn’t make sense, and I don’t see how it could possibly work.

Attached Images
Screenshot from 2013-07-18 17:15:42.png (210.5 KB)

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Case 5_2 Project

By TomFord1

I’m totally lost on what the code suppose to look like on this project:

The Antonio Czechos Drywall Firm has hired you to help implement a directory structure for them based on Figure 5-19. Because you were called out of town to aid another customer, you cannot go to the site. In the meantime, you decide to write a script that will create the structure for them. To create the directory structure, complete the following tasks:

Helllllllllllllllllllllllp!!!:eek:

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Connecting to a server using FTP is hanging

By Kannannair

File Type: jpg
Hi Friends

I have created a shell script to connect to a windows server. But the problem is while trying to run the script I am not getting any output. After running the script it is hanged and the prompt is not showing until if I press the ctrl+Z to break the script. I also tried using the FTP command but here also I am getting the “Connecting to server address” meaasge and after that it is hanged.

I checked using telnet and it is working but while doing telnet it is asking for the username and password and the FTp port 21 is opened also. For your refrence I am attching the screenshot of FTP.

Can anybody tell me why this is coming.

Thanks and Regards
Darshan

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Installation problem in Ubuntu

By toshanshu

File Type: png
ins this a common problem , whenever i try installing a new package or software i usually get this failure msg:

Setting up dsc-statistics-collector (201203250530-1) …
Adding system user
Warning: The home dir /home/Debian-dsc-statistics you specified already exists.
The system user `Debian-dsc-statistics’ already exists. Exiting.
* Starting DNS Statistics Collector (default) dsc-collector
* already running! ๐Ÿ˜ฎ
[fail]
invoke-rc.d: initscript dsc-statistics-collector, action “start” failed.
dpkg: error processing dsc-statistics-collector (–configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:

i cant linkup the problem w/o knowledge of DNS static collector and their significance in this context
even googling it doesn’t give satisfactory meaning

i m expecting expert review!
:p

thanks in advance ๐Ÿ™‚

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Scrabble Regex Help

By sudon’t

File Type: jpg
Hi!
I use an and grep to play Scrabble and other word games because it helps me practice regexes, or, as my friends would say, because I’m a cheater.
Anyway, I’m trying to work out how to write a regex that might do what I want, so let’s see if I can explain it properly. Let’s say we want to play down. We have a letter, F, followed by three spaces, then a D, which is at the end of the board. The space below the F is a DW, so we want to play it, if possible. We have plenty of room above the F, but we can only play two spaces below F if we can’t use the D, three if we can use the D. I have attached a screen-shot of the board if you’re having a hard time visualizing it. I have already played “famed.”
So, here’s the regex I tried:

Code:

an -w -m3 -d twl 'qreraumfd' |grep -E '.*f.{1,3}d?$'


We anagram my rack, plus the F and D, and pipe it to grep. Here we’re saying we can have one to three characters after the F, and the D can be there or not. While it returns many usable results, it also returns results which ignore the D. For instance:

Code:

fard
farm
fear


which can’t be used because you’d have “fardd” or “farmd”, and so on.
Perhaps you are thinking, “Why not just ignore the four-letter words it returns?” And certainly I could pipe it to grep one more time to eliminate them, but I want to know if I can do it all in one grep ERE.
I’ve tried it a few different ways, but can’t quite work it out:

Code:

an -w -m3 -d twl 'qreraumfd' |grep -E '.*f.{1,2}.?d?$'


returns identical results.
What do you think? Is it possible?

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Permission denied for bash

By toshanshu

File Type: png
my file permissions are -rwxrwxrwx for runInstall file
and while giving ” sudo bash runInstall.sh ” then i am getting error ” permission denied”
now i don’t see any reasonable answer for that please suggest what should i do?
๐Ÿ˜ฎ
got to start DBConnection practice with oracle database and its difficult to even install the software ๐Ÿ˜€

new to unix environment and trying to learn;)

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

X Window isn't running

By ravisingh

File Type: png
X Window isn’t working.
When I ran

Code:

startx


I got an error message as shown in file attachment xwndow.png
Accordingly, I removed /tmp/.X0-lock as reflecting in the attchment.
Then again I ran the command and 2 more commands (shown in the attachment xwndow1.png) but they failed too.
Any suggestion on starting the same.

Attached Images
xwndow.png (53.4 KB)
File Type: png xwndow1.png (80.3 KB)

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Perl : to get all the hyperlinks from the xlsx sheet(hyperlinks not visible in excel sheet directly)

By scriptscript

File Type: gif
Hi folks,

I have a requirement in perl to print all the hyperlink from the spreadsheet(xlsx).
Spreadsheet contains few lines of hyperlink data (pic attached).

P.S. Hyperlink is behind the data and not visible in excel sheet directly.

Now using perl script I need to copy the hyperlinks in seperate excel sheet.

I have browsed CPAN modules but havnt found the module that suits my requirement.

Could you please help me on this ?

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Is it possible to extend a extended partition raw space in harddisk thru rhel 6

By redhatlbug

File Type: png
hi all,

As going thru LVM concepts in rhel 6, got hit with a question about “how to use the raw partition of an harddisk which extended volume is taken a bit”

please find the attached diagram…

is it possible to use this raw space with previously created extended partition without data loss or do we have to delete the previously created extended partition and create again with raw space ?

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

You' dont have any Linux partition- Rescue Mode

By ahsanpmd

I accidently deleted fstab file from one of the compute nodes of the cluster (RHEL 5.3). Due to this no filesystem/directory is mounted on the system during bootup. I started system in rescue mode but it says You don’t have any linux partitions. Press return to get a shell. The system will reboot automatically when you exit from the shell
I thought about creating new fstab (I have a backup file) in /mnt/sysimage/etc/
but I am not able to see /mnt/sysimage as there is nothing mounted.
fdisk -l shows this (attached in snapshot)

How can I mount my system again!

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Collaborate In A Live UNIX/Linux Shell Session Using Coterm

By TheCotermGuy


Coterm: A software application that allows users to simultaneously enter input and view output from each other, while interacting with a live Unix/Linux Shell.


Hello world . . .

This is The Coterm Guy, here to discuss how Coterm can benefit you. You can do just about anything in a Shell Session, including tasks such as installing software, troubleshooting programs and running commands that gather information on your current internet connection status. A person can perform these tasks on any two computers using a Unix/Linux based Shell Session, from anywhere in the world, via the SSL Internet protocol.

Now, what if the problem arises where two or more people need to work in that single Shell Session but these people are located in different parts of the globe? Collaboration in a Standard Unix/Linux Shell Session can be frustrating and is extremely limited. You can still accomplish a level of collaboration by using a ” Screen “, but a Screen is complicated to use, and as stated before are very limited when it comes to functionality.

Coterm was developed to solve this issue by creating an environment where work can take place in a single Shell Session, with multiple users connecting all at the same time. The Coterm โ€œassistedโ€ Shell Session allows monitoring and the input of text code by all active users during the session. This also allows for real time troubleshooting, enabling you and your team to become more productive and solve tasks at an accelerated rate.

Think about this, how annoying is it when the other engineer has control of the keyboard when you want to type? With Coterm, both engineers have keyboards and can use the same Shell Session. Taking away this frustration makes life a lot more enjoyable for all of us. Coterm is just like Google Docs for the Shell. Think about how easy it is use Google Docs to collaborate and share documents . . . that’s how easy it is to use Coterm.

Akiri Solutions is an experienced group of developers and computer engineers dedicated to improving productivity through the Shell.

For now, this is The Coterm Guy, logging offโ€ฆ
Attachment 4181

Source: FULL ARTICLE at The UNIX and Linux Forums

Problem writing/wrapping files under folder using perl

By Optimus81

I have a script which generates env setup xml file by reading path.It read the path and checks if there is any file/dir present recurseively.
If a file is found under sub directory then it will read the file and the values from the file are passed to generate xml format.

Problem is if i have a file in sub directory, then in xml format, these file information should come under sub directory name but current script
write all the file information under only main sub directory level2.
Ex :
Path : C:SDSetupData
In the above path, there will sub dir level1 : UAINI
C:SDSetupDataUAINI
under this level1, there will another level2 of sub dir : Base
C:SDSetupDataUAINIBase
under this level2, there will 3 sub dir’s level3 :

Code:

A1 : 1-A.bat,1-AD.bat files
B2 : 2-BDD.bat, 2-BEE.bat files
W1 : 1-WM.bat, 2-WMA.bat files


each of these sub dir’s will have 1 or more files
file content will be:

Code:

start putty -ssh -P 22 10.24.04.20A -Q root -pw olp.ikmj


now after running the main script,i get the xml format with the content under Base dir as container(level2). Instead, should get xml format
with having 3 containers and each container having sub dir’s level3 name and it’s file content.

Code:

#!/usr/bin/perl
use strict;
use warnings;
use File::Find;
my $basedir = "C:/SD/Setup/Data/";
my $envname = "HMDS_EnvSetup";
my $counter;
my @basedir;
open( my $resultfile, '>', 'C:SDSetupResultsresultfile.dat' ) or die "resultfile.dat: $!";
# the next bit should only be written one time per xml output file:
print $resultfile <<EOH;






EOH
my @containers;
my $indent = '';
#print scalar(@containers);
find( &wanted, $basedir );
if ( @containers ) {
for ( 1 .. $#containers ) {
print $resultfile "$indentn";
chop $indent;
}
}
print $resultfile "nn";
sub wanted {
return if ( /^..?$/ );
if ( -d ) {
my ( $root, @levels ) = split m{/}, $File::Find::dir;
print "levels are :@levelsn";
print "Containers are : @containersn";
if ( @levels >= @containers ) { # push one level deeper
$indent .= " ";
print $resultfile "$indentn";
$counter++;
}
elsif ( @levels <= @containers ) { # pop out one level
print $resultfile "$indentn";
chop $indent;
}
elsif ( $levels[-1] ne $containers[-1] ) { # same level, different path
print $resultfile "$indentn";
print $resultfile "$indentn";
}
@containers = @levels;
}
elsif ( -f _ and -s _ ) {
process_file();
}
}
sub process_file {
my $filename = $_;
open my $fh, '<', $filename or die "$File::Find::name : $!n";
my @linecolumns;
while () {
chomp;
s/ /,/g;
@linecolumns=split(',',$_);
}
print $resultfile <<ETX
$indent
$indent
$indent $filename
$indent SSH
$indent $linecolumns[5]
$indent $linecolumns[4]
$indent Default Settings
$indent $linecolumns[6] $linecolumns[7] $linecolumns[8] $linecolumns[9]
$indent
$indent
$indent
$indent
$indent
$indent
$indent
$indent
ETX
;
}


now getting output as :

Code:







1-WM.bat
SSH
19.20.54.21
221
Default Settings
-l root -pw uy.ju

2-WMA.bat
SSH
19.20.54.21
221
Default Settings
-l root -pw uy.ju

2-BBD.bat
SSH
98.28.54.21
27
Default Settings
-l root -pw direct.nA

2-BBE.bat
SSH
18.38.58.88
28
Default Settings
-l root -pw direct.2A

1-A.bat
SSH
10.24.04.20A
22
Default Settings
-l root -pw olp.ikmj

1-AD.bat
SSH
09.25.05.10B
11
Default Settings
-l root -pw llb.ujyh


Attached png file to show how current output looks like.

Instead am trying to get like this : please note i added container tag manually here to get each sub dir’s level3 dir name/wrapper.

Code:







#-----This added manually

1-WM.bat
SSH
19.20.54.21
221
Default Settings
-l root -pw uy.ju

2-WMA.bat
SSH
19.20.54.21
221
Default Settings
-l root -pw uy.ju

#-----This added manually

#-----This added manually

2-BBD.bat
SSH
98.28.54.21
27
Default Settings
-l root -pw direct.nA

2-BBE.bat
SSH
18.38.58.88
28
Default Settings
-l root -pw direct.2A

#-----This added manually

#-----This added manually

1-A.bat
SSH
10.24.04.20A
22
Default Settings
-l root -pw olp.ikmj

1-AD.bat
SSH
09.25.05.10B
11
Default Settings
-l root -pw llb.ujyh

#-----This added manually


Source: FULL ARTICLE at The UNIX and Linux Forums

Help with putty window setting

By kunwar

hi friends,
This is not a shell scripting related doubt, but still posting so that you can answer it ๐Ÿ˜‰ or redirect to correct place in this website.

Many a times i have to open multiple putty sessions by duplicating a session and want to rename their tabs.

For this activity i have to right click(using mouse) on the topmost tab of the putty window. (Attached snapshot of the same)

Can you please suggest a keyboard shortkey for the same?

Regds,
Kunwar

Source: FULL ARTICLE at The UNIX and Linux Forums