Ivorde Unix/Linux/Database/Web/Mail Forum

View unanswered posts
View active topics
It is currently Sat Feb 04, 2012 11:18 pm


News News of Ivorde Unix/Linux/Database/Web/Mail Forum

Site map of Ivorde Unix/Linux/Database/Web/Mail Forum » Forum : Ivorde Unix/Linux/Database/Web/Mail Forum

Welcome to ivorde.ro forum

 [ Total topics 139 Go to page 1, 2, 3, 4, 5 ... 14

Message
 Post subject: Mysql> select records that have date/datetime column equal to today's date
PostPosted: Tue Nov 22, 2011 4:40 pm 
How to select rows from a mysql table containing multiple records, all of them having a datetime column.

Example mysql table:
Code:
mysql> select * from info;
+---------+---------------------+------------+
| id | upload_date    | ip    |
+---------+---------------------+------------+
|       1 | 2011-11-21 21:07:29 | 0123456789 |
|       2 | 2011-11-21 21:15:07 | 0123456789 |
|       3 | 2011-11-22 14:26:49 | 0123456789 |
+---------+---------------------+------------+
3 rows in set (0.00 sec)


Selecting rows with datetime column equal to today's ...

Read more : Mysql> select records that have date/datetime column equal to today's date | Views : 148 | Replies : 0 | Forum : Mysql

Top
 Post subject: How to use a mysql stored procedure
PostPosted: Mon Nov 21, 2011 11:12 pm 
Unlike other sql commands, stored procedures need to be called. Therefore the CALL command needs to be used:

Code:
mysql> CALL stored_procedure_name('argument1,'argument2');

Read more : How to use a mysql stored procedure | Views : 263 | Replies : 1 | Forum : Mysql

Top
 Post subject: Mysql command to show stored procedures
PostPosted: Mon Nov 21, 2011 10:57 pm 
Mysql command to show stored procedures

Code:
mysql> show procedure status \G;


or to show stored procedure for a specific database:
Code:
mysql> show procedure status where Db = 'database_name' \G;

Read more : Mysql command to show stored procedures | Views : 162 | Replies : 0 | Forum : Mysql

Top
 Post subject: Apache - Restricting "Server" information in HTTP response header with ServerTokens
PostPosted: Thu Nov 10, 2011 1:39 pm 
Apache - how to strip down the "Server" field in HTTP response header with ServerTokens

By default, the apache webserver may provide too detailed info in the http response header for your needs. Example:

Code:
HTTP/1.1 404 Not Found
Date: Thu, 10 Nov 2011 10:35:52 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 202
Connection: close
Content-Type: text/html; charset=iso-8859-1


Stripping down the "Server" field in the http response can be done in ...

Read more : Apache - Restricting "Server" information in HTTP response header with ServerTokens | Views : 196 | Replies : 0 | Forum : Apache, Nginx, Lighttpd and other web server software

Top
 Post subject: Linux/FreeBSD how to check ntp time synchronization
PostPosted: Tue Nov 01, 2011 4:50 pm 
Giving that a system has ntpd up&running, ntpq utility can be used to check system time synchronization:
Code:
# ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+80.96.120.251   .PPS.            1 u  984 1024  377   10.723   -0.909   1.437
+80.96.120.252   .PPS.            1 u  851 1024  377   10.800   -0.503   0.476
*80.96.120.253   .PPS.            1 u 1019 1024  377   10.611   -0.698   0.669


Man ntpq quote:
Quote:
NTPQ(8) FreeBSD System Manager's Manual NTPQ(8)

NAME
ntpq -- ...

Read more : Linux/FreeBSD how to check ntp time synchronization | Views : 285 | Replies : 3 | Forum : Tutorials for general Unix

Top
 Post subject: bash: -bash: output: cannot overwrite existing file
PostPosted: Mon Oct 31, 2011 2:03 pm 
In Bash shell, redirecting output to a existing file is not possible if the "noclobber" bash option is set.

To overcome this, use the ">|" or ">>" redirect operator. The pipe will overwrite the file if you are using single angle bracket and append if you're using double angle brackets.

How to forcely overwrite a file with output from a command:

# cat output
# echo 'output' >output
-bash: output: cannot overwrite existing file ...

Read more : bash: -bash: output: cannot overwrite existing file | Views : 246 | Replies : 0 | Forum : Tutorials for general Unix

Top
 Post subject: bash: Redirecting standard error to a shell variable and standard output to a file
PostPosted: Mon Oct 31, 2011 1:54 pm 
A little background from bashref:http://www.gnu.org/software/bash/manual/bashref.html
Quote:
3.2.4.3 Grouping Commands

Bash provides two ways to group a list of commands to be executed as a unit. When commands are grouped, redirections may be applied to the entire command list. For example, the output of all the commands in the list may be redirected to a single stream.

()
( list )

Placing a list of commands between parentheses causes a subshell environment to be created (see Command ...

Read more : bash: Redirecting standard error to a shell variable and standard output to a file | Views : 165 | Replies : 0 | Forum : Tutorials for general Unix

Top
 Post subject: FreeBSD to FreeBSD - OSPF over GRE over Ipsec transport mode (racoon) - Part 2
PostPosted: Sun Oct 30, 2011 2:36 pm 
After setting up the IPSec tunnel between the two FreeBSD hosts (FreeBSD-A and FreeBSD-B) in part 1 (http://forum.ivorde.ro/freebsd-to-freebsd-ospf-over-gre-over-ipsec-transport-mode-racoon-part-1-t860.html using gre0 interfaces on both nodes, in this part I set up OSPF.

The relevant OSPFD configuration (quagga) on both nodes is simple. This is for FreeBSD-A node:
Code:
!
interface gre0
ip ospf hello-interval 2
ip ospf dead-interval 6
!
router ospf
ospf router-id A2.A2.A2.A2
redistribute static
network A2.A2.A2.A2/30 area 0.0.0.0
!




Ospf "hello" packets ...

Read more : FreeBSD to FreeBSD - OSPF over GRE over Ipsec transport mode (racoon) - Part 2 | Views : 226 | Replies : 0 | Forum : VPNs

Top
 Post subject: How to check if ssh/http daemon listens on TCP port in FreeBSD using sockstat & lsof & netstat util
PostPosted: Mon Oct 17, 2011 4:27 pm 
How to check if ssh/http daemon listens on TCP port in FreeBSD using sockstat & lsof & netstat utilities

As compared to Linux, FreeBSD "netstat" doesn't show the process ID, but instead, the "sockstat" utility does.

Checking SSH and Apache TCP ports in Linux and FreeBSD using lsof utility:
# lsof -Pni :22 -i :80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
httpd 17543 www 3u IPv6 0xc35d3cb0 0t0 TCP *:80 (LISTEN)
sshd ...

Read more : How to check if ssh/http daemon listens on TCP port in FreeBSD using sockstat & lsof & netstat util | Views : 256 | Replies : 0 | Forum : System administration

Top
 Post subject: How to check if ssh/http daemon listens on TCP port in Linux using lsof & netstat
PostPosted: Mon Oct 17, 2011 4:17 pm 
To show listening sockets in Unix, the "netstat" utility can be used with different arguments, depending on the specific OS.

Man netstat:
Quote:
--numeric , -n
Show numerical addresses instead of trying to determine symbolic host, port or user names.
-e, --extend
Display additional information. Use this option twice for maximum detail.

-p, --program
Show the PID and name of the program to which each socket belongs.

-l, --listening
Show only listening sockets. ...

Read more : How to check if ssh/http daemon listens on TCP port in Linux using lsof & netstat | Views : 188 | Replies : 0 | Forum : System administration

Top
 [ Total topics 139 Go to page 1, 2, 3, 4, 5 ... 14


Last 10 active topics


TCP/IP Networking

No new posts How to add IP alias in Debian Linux to last after reboot
View the latest post
No new posts Linux How to change hardware MAC address of an interface
View the latest post

Linux & BSD on desktops and Multimedia stations

No new posts In Favor Of FreeBSD On The Desktop
View the latest post

Virtualization

No new posts Iptables filtering Xen bridged domains & enforcing specific IP address for each of these domains
View the latest post
No new posts spidervps.com - NEW VPS hosting company: SPIDER VPS !
View the latest post

Mysql

No new posts MySql rename table
View the latest post
No new posts Mysql> stored procedure for inserting in multiple tables \w common key
View the latest post
No new posts Mysql> select records that have date/datetime column equal to today's date
View the latest post
No new posts How to use a mysql stored procedure
View the latest post
No new posts Mysql command to show stored procedures
View the latest post

Login

Username:   Password:   Log me on automatically each visit  

Statistics

Statistics

Total posts 188 | Total topics 681 | Total members 811



News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC + 2 hours [ DST ]

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
DAJ Glass 2 template created by Dustin Baccetti

phpBB SEO