rch1231 169 Posting Shark

Hello,

You need a backslash to tell the script to escape the normal use of the next character. Try this:

while read line; do echo -e "${"${line:21}"/\//-}"; done < Albums-linux.txt

rch1231 169 Posting Shark

Hello,

try something like this:

#!/bin/bash
echo "Input  some numbers, separated by a space please:"
read -a choice
$result=0
for a in `echo $choice`
do
    $result=$result + $a
done
echo "The result after adding all numbers is: $result "

The echo $choice may be off a bit you may need just $choice (it has been a while).

rch1231 169 Posting Shark

Hello,

Try a union statement and do two seperate queries :

Select column_1 as mycolumn from table1
union
select column_2 as mycolumn from table2
rch1231 169 Posting Shark

In the group by just list the Detail.ProductID. Or if you want it broken down by date then list date and Detail.ProductID. Don't list the quantity.

rch1231 169 Posting Shark

Did you give the user privileges to access the database projects?

momonq1990 commented: thanks +1
rch1231 169 Posting Shark

Hello,

I tried that sshdfilter and found denyhosts to be a much easier application to install and configure. And it works.

rch1231 169 Posting Shark

Hello,

What you are looking for is something like this:

select artist, count(artist)
from mytable
group by artist
rch1231 169 Posting Shark

Hello,

Depending on the version of Excel what you are looking for is normally under the main heading of Data. The option is called "Text to Columns". You need to have an empty column to the right of the current column for every additional column ( in your case 1 column is needed). The highlight the column and use the Text to columns option and tell the wizard it is delimited and the character is the pipe (|).

rch1231 169 Posting Shark

Hello,

It is really very simple but it took me a while to find it too.

create table newtable
SELECT adp.adsPageId,adp.adsSpaceId, DATE_FORMAT(adp.dayClick, '%Y-%m-%d') AS dateReport, 
(SELECT COUNT(*) FROM ads_display att WHERE att.adsSpaceId = adp.adsSpaceId AND att.adsPageId = adp.adsPageId AND att.dayClick = adp.dayClick) as TotalView,
(SELECT COUNT(*) FROM ads_click acc WHERE acc.adsSpaceId = ack.adsSpaceId AND acc.adsPageId = ack.adsPageId AND acc.dayClick = ack.dayClick) as UniqueClick

FROM ads_display adp

LEFT JOIN ads_click ack

ON adp.adsSpaceId = ack.adsSpaceId

AND adp.adsPageId = ack.adsPageId

AND adp.dayClick = ack.dayClick 

GROUP BY dateReport,adp.adsPageId,adp.adsSpaceId

ORDER BY dateReport,adsPageId,adsSpaceId ASC
rch1231 169 Posting Shark

Hello,

Depends on what subnets you are using on each NIC and which NIC you want to be the connection to the internet. The GATEWAY IP is the address the system uses to reach computers not in your subnet (the internet). You can only have one gateway, just like you can only leave your house by one door at time you can only leave your subnet via one route at a time. If you are running a private backbone then dimply do not assign a gateway address to the NIC on the private network.

rch1231 169 Posting Shark

Hello,

I cheated and used the following app in windows or dos based systems:
http://www.informatics-consulting.ch/software/namedate.htm

rch1231 169 Posting Shark

Hello,

OK your call. It is unusual for mysql to just freeze. Have you looked at the logs to see what is causing it. I run multiple web servers that have not had mysql restarted in over a year.
In any event you need to do a system call and run

mysqladmin stop -u root -p

and have them enter the mysql root password when prompted.

rch1231 169 Posting Shark

Hello,

Well you are running into a couple of things that you really need to think about. The security in the server is such that users from the internet should not be able to start and stop services on the server. If you can start and stop it anybody can. You would have to do it from mysqladmin and you would need the root mysql password.

If you don't mind me asking why do you need to stop and start the service from a web page?

rch1231 169 Posting Shark

Hello,

This should work provided you have access to the file and directory listed:

copy "\\ServerNameOrIP\c$\Program Files\Microsoft Sql server\backup\test.bak" C:\backup\
rch1231 169 Posting Shark

Hello,

Based on the apt-get entry I am going to direct you towards this site:
http://www.howtoforge.com/ubuntu_pxe_install_server

rch1231 169 Posting Shark

Check your router. They normally have an option for setting one of the systems as a DMZ host. This is the system that will receive all requests from the internet for things like HTTP and FTP.

rch1231 169 Posting Shark

You can try moving either your wireless router or the wireless antenna for your card to a higher position while leaving it in the same room. If the antenna on either is to close to the floor the high frequency signal can cause interference with its self. Moving it to a higher location gives you a stronger signal. Or you can create a simple signal booster by placing the router antenna about 2 inches from the corner of the 90 degree angle (corner) cut from a box and lined with foil. Try Googleing wireless antenna booster. They can boost the signal by a factor of 10.

rch1231 169 Posting Shark

Hello,

There are several applications you can purchase that will do this and many of thenm have a free trial version. My suggestion is that you go to one of the sites like CNET downloads where they review the software and post customer reviews of the software and find one that people liked that does what you want. System Surveillance Pro was the editors choice and has a free trial download, and SurveilStar Employee Monitor was another option that has a free version as well as enterprise and small company monitoring (and blocking) packages for email, chat and browsing.

rch1231 169 Posting Shark

Hello,

The address you are seeing is a default when any network card cannot find the DHCP server properly. I have seen this before with XP and the easy way to fix it is to give the card a fixed address (like 192.168.1.15) on the network, then once connected change it back to DHCP and everything will work just fine. Some older cards seem to need to know what subnet on the network they are connected to. You need to know what subnet you are using first and you can find that from one of your working systems. If you need more specif instructions let me know.

rch1231 169 Posting Shark

OK then the next thing to do is to find out why it is crashing. One great thing about Unix/Linux is there is a log for everything. Take a look in /var/log and see if there is a log file for the application and also check in /var/log/messages. They are just text files and you may be able to find out what is crashing the app.

rch1231 169 Posting Shark

Hello,

Normally when you start a service you should not have to stop and restart it all of the time. You should be able to start the daemon once and it runs and creates additional children as needed. What prompted you to want to continually stop and restart the service?

rch1231 169 Posting Shark

Hello,

Your best bet is to run a HDMI or VGA Video cable (TV's usually have one or the other now a days) to a PC somewhere nearby (there are extender cable of up to 50ft) and run files from the computer. There is a free flash player from Adobe that will let you list flash videos in the order you want them played and the loop them over and over. You could play AVI files using VLC media player which also has a play list that will loop or you could run PowerPoint presentations.

rch1231 169 Posting Shark

OK try this from their site. Put an entry in /etc/init.d to make it a service that you can start or stop.
http://trac.red5.org/wiki/AppServer/Startup%20Scripts
but when pasting the code from the example STOP at the line that reads

esac

The rest is comments on how to use the service.

once it is listed in /etc/init.d you can set it to start when the system boots by using the command line application
chkconfig
Or use the system GUI and go to services and set it to start.

serdas commented: thank you for not giving up on me, many many thanks +3
rch1231 169 Posting Shark

Take a look at an application called spamdyke. It does a good job of breaking down how they block spam servers. The source code is there in PERL and you can get a good idea of how it works. It is an add on for qmail under Linux and is free under GNU Public License and has stopped almost all spam (except for email lists that people subscribe to) on the servers I manage.

http://www.spamdyke.org/

rch1231 169 Posting Shark

Hello,

On the ports you need available the one I can think of are:

21 ftp
22 ssh
25 smtp (email)
80 http
110 pop3 (email)
115 sftp
143 imap
220 imap2 (email)
443 https
465 smtp SMTP over SSL (TLS)
587 smtp (email - alternate as some ISP's block 25)

All the ports should be listed in /etc/services


On getting your domain name pointed to the server, go to godaddy and for your domain name find the DNS Manager. Point the A record to the IP static address of your router or firewall. On the router make the Linux server your DMZ host.

If you have not already installed email, Apache, mysql and PHP may I suggest looking into qmailtoaster. I use their installation and configuration scripts to set up web servers I manage housing multiple sites and company email. It gives you secure email with anti-spam and virus protection. Web based email and site configuration pages that can be managed by clients, along with webmail (squirrel mail). It also configures Apache and PHP to be secure for preventing sites from being hacked.

http://www.qmailtoaster.com/

rch1231 169 Posting Shark

Hello,

You can redirect the output (standard IO and error) of the application to a file like this:

/home/ramesh/red5.sh  2>&1 >> /home/ramesh/mylogfile

The purpose of nohup is to allow the shell to keep running when the terminal disconnects. In cron there is no actual terminal so you don't need to send the app to the background or use nohup. Can I ask what it is that red5.sh does? Or could you email me the script via private message if you don't want to post it here.

rch1231 169 Posting Shark

Hello,

You need the full path to red5.sh something like:

nohup sh /home/ramesh/red5.sh &
rch1231 169 Posting Shark

Hello,

It really depends on how secure your Apache and PHP installations are configured. There are many options to make PHP more secure and suggested practices for making a site secure. It is possible to lock the system down so that they cannot be read but it is not always configured properly.

rch1231 169 Posting Shark

Hello,

Check the crontab error logs to see what happened. It is probably your path. Cron does not execute with your path and does not know where your programs are. Try putting the full path name in front of your program and it will probably work.

/sbin/service mystuff stop
/home/ramesh/red5.sh
/sbin/service mystuff start
rch1231 169 Posting Shark

hello,

nohup only works for the shell script you are calling from the command line it does not work inside a shell.

hag++ commented: Don't triple post -1
PhilliePhan commented: Good advice! +12
rch1231 169 Posting Shark

Hello,

Try this. open a terminal and become the root user (using su or sudo) then execute the following two commands and it should refresh the YUM distribution cache.

yum clean all
yum list

You should get a list of all applications available via YUM and your add remove packages application should now be working.

rch1231 169 Posting Shark

Try this sql statement instead:

"SELECT group_id, rec_id FROM RandPtrack where type='R' order by group_id desc limit 1"

This will select all records sort them in descending group_id order (with the largest group_id first) and them limit the output to one (the first) record.

rch1231 169 Posting Shark

Hello,

If I understand correctly what you want to happen is to be able to log off the server (close putty) and still have the program program continue to run till completion. There are a couple of options/applications available for this and one built into the system by default. Look up the command nohup which is short for nohangup and you can find out about it by typing:

man nohup

from the shell when logged in via putty.
To use it in your case you would do:

nohup ./red5.sh

you can then close putty and the program will continue to run and sends any output to a file called nohup.out.
Another option which can be very handy, especially if you need to be able to get back to the running application, is called screen and will keep your shell running as a virtual terminal that you can reconnect to. It is kind of like when you RDP to windows server, close RDP and are able to reconnect to the session later. Here is a link to a site with a good discussion on screen:

http://www.manpagez.com/man/1/screen/

rch1231 169 Posting Shark

XP by it's self does not recognise the ext3 filesystem partition so you will need some sort of application that knows about ext3. Unix filesystem utilities for windows, Paragon HD manager, partition magic, etc.

rch1231 169 Posting Shark

Hello,

Not exactly. If I understand you correctly you need to do a couple of things in a specific order to run your backups. Stop some service, then run your backup then restart the service. The easiest way is to create a shell script that does everything then call that script from cron. The linux shell is much more powerful and is like a programming language of it's own. Let's say the service you need to stop is called myservice and your backup program is called /home/ramesh/bin/incremental-backup like in your example. The the script to stop the service, run the backup and restart the service is called cron_backup_code and would be something like this:

#!/bin/bash
/bin/service myservice stop
/home/ramesh/bin/incremental-backup
/bin/service myservice start

then you call that script from cron with

00 11,16 * * * /pathtoomyscript/cron_backup_code

In linux the extension is not needed to make a file execute like windows. It does not have to have .sh or .exe to run just have the execute bit set.

rch1231 169 Posting Shark

Hello,

That would depend on what you mean by a new client. Are you referring to a client computer that can access the server as a file server, or a new user that can connect to the server via RDP, or a new client application that can be accessed from other systems?

rch1231 169 Posting Shark

Hello,

Try starting it in safe mode and running your antivirus program from there. As the computer starts to boot start hitting the <F8> key and you will get options for starting windows. One of the options is Start Windows in Safe Mode. This will load the minimum drivers and apps and get windows up and running. Let us know what happens and we can work from there.

rch1231 169 Posting Shark

Hello,

Based on what you are trying to do I think you will find that there is a simpler way by using a left or right join. If you left join two tables the output will be every record matching your where statement in the first table and the fields from the second table will have a NULL value. For example:

SELECT p.topic_id, 
p.topic_id, 
p.forum_id, 
p.author_id,
p.ip_address, 
p.topic_date,
members.username AS post_username,
p.title, 
p.body,  
forum_attachments.post_id AS has_post_id
FROM forum_topics p
left join members on members.member_id = p.author_id
left join post_id on forum_attachments WHERE forum_attachments.post_id = p.post_id
Having has_post_id is not null

The Having line forces it to only out lines that meet the test even though the select by its self may give more lines. I renamed the field to Has_post_id so there would not be any confusion as to which output field to check for NULL

rch1231 169 Posting Shark

Hello,

You should not need port forwarding inside your local network. It may be the firewall on the computer you are trying to connect from. Try turning off the firewall or telneting to the ip and port. For example to telnet to port 80 on IP 192.168.0.3 you would use:

telnet 192.168.0.3 80

and see if you can connect.

rch1231 169 Posting Shark

Hello,

My first guess is that you have not installed the chipset drivers for your motherboard for Vista. Without them the wifi driver will not be able to communicate with the wifi device through the motherboard.

rch1231 169 Posting Shark

Hello,

Generally speaking a hard drive is a hard drive no matter what packaging it has. The main things you have to watch out for are the interface (SATA, PATA, SCSI, SAS, Fiber-SCSI, etc.) Most external storage systems sold for home or small office use now a days are simply SATA drives in some sort of housing. Logically YES you should be able to pull the drive our of the unit and use it in another.

rch1231 169 Posting Shark

It is possible but there are limitations. You have to have directory listings turned on and you have to have a web server like IIS or Apache installed. You don't have to go that route if you share the directory inside windows and limit the users to those with accounts and passwords then you can map that directory on any other system as a drive.

rch1231 169 Posting Shark

Hello,

Initialize basically re-formatted the hard. Don't panic. You can recover the partition. If you have another system you can connect the drive to then look for a free program developed for the US Air Force called testdisk (usually packaged with photorec). Testdisk will look at the raw drive and attempt to recover the partition the way it was.

If you are not sure what to do contact your company IT team or if you want a GUI based application there are hundreds to choose from. Personally I like R-Studio and actually have purchased and re-ordered later versions of their recovery tools. But there are others which I am sure my fellow techs will be telling you about soon.

rch1231 169 Posting Shark

Hello,

Can you provide a little more detail about what port you are trying to forward to what IP address inside your router?

Port forwarding is normally used when you want the WAN IP address of the router to forward a port to a specific IP inside your local network.

For example if your routers external IP address is 12.13.14.15 and you want to set up a web site on your local system (at IP address 192.168.0.3) then you want any port 80 traffic that hits your router, from outside (the internet), to be forwarded to that system. You would set up port 80 forwarding to IP 192.168.0.3 port 80.

Many routers have what is referred to as a DMZ host which is the default system that can be accessed from the internet.

Does that help?

rch1231 169 Posting Shark

Hello,

What you are looking for is the fstab or file-system table which is found in /etc . Here is a link to the ubuntu reference page on setting it up:
https://help.ubuntu.com/community/Fstab

rch1231 169 Posting Shark

Hello,

The first thing I can see is the wait table does not have a field called chat_id so the join will fail there.

rch1231 169 Posting Shark

Hello,

I would start by finding out what it is mounted as. Use the mount command by it's self to see what filesystems are mounted and where they are mounted.

Below are the results from running mount on my laptop...

[root@lptp1 ~]# mount
/dev/mapper/vg_lptp1-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/vg_lptp1-LogVol02 on /nfs type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
gvfs-fuse-daemon on /home/rod/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=rod)

Once you see how and where the fuse filesystem is mounted then unmount the specific connection to the filesystem with

umount <filesystem> <mount point>
vedro-compota commented: +++++ +3
rch1231 169 Posting Shark

Hello,

It depends on what you mean by network card. If you are referring to the number of physical cards installed in the computer you would have to look in device manager for the device. This will only show devices that the system has detected to be network cards. If you are referring to the number of physical ports or connections to the system you have then the command line application IPCONFIG will give you a listing of currently configured devices and their addresses. Be aware that tunnelling devices are actually a way of giving a port a second name and are not physical devices.

rch1231 169 Posting Shark

I would check to see if the CPU Fan is working. You should feel air coming out the vent on the side or back. They are designed to shut off rather than burn out the CPU. Also try cleaning out any dust from the fan assembly. Normally I use a can of AIR you can buy at anywhere selling computer parts (Walmart, target, CompUSA, etc.)

rch1231 169 Posting Shark

Hello,

Try changing the WHERE MAX(Votes) to

WHERE Votes = (select MAX(Votes) from $portfolio )