我有桌子,我已经尝试设置PK FK关系,但我想验证这一点.如何显示PK/FK限制?我看到了这个手册页,但它没有显示示例,我的谷歌搜索也没有结果.我的数据库是credentialing1和我的约束表是practices和cred_insurances.
在Linux中,
"echo %date% %time% %COMPUTERNAME%"
Run Code Online (Sandbox Code Playgroud)
回报
%date% %time% %COMPUTERNAME%
Run Code Online (Sandbox Code Playgroud)
不
Fri 09/24/2010 10:46:25.42 WXP2010043001
Run Code Online (Sandbox Code Playgroud)
就像Windows一样.我需要能够为我正在设置的日志执行此操作.
现在,我所知道的是:
find / -name string.*
Run Code Online (Sandbox Code Playgroud)
区分大小写,它将找不到名为的文件:
1string.x
STRing.x
string1.x
Run Code Online (Sandbox Code Playgroud)
我如何搜索以便在搜索中将所有上述内容返回到不区分大小写的匹配?
我已使用此脚本使用端口25(非安全)将端口成功发送到远程服务器:
require 'rubygems'
require 'mail'
options = { :address => "mail.domain.com",
:port => 25,
:domain => 'mail.domain.com',
:user_name => 'somedude@domain.com',
:password => 'topsecret',
:authentication => 'login',
:enable_starttls_auto => true }
Mail.defaults do
delivery_method :smtp, options
end
mail = Mail.new do
from 'someotherdude@otherdomain.com'
to 'somedude@domain.com'
subject 'This is a test email'
body File.read('body.txt')
end
puts mail.to_s
mail.deliver!
Run Code Online (Sandbox Code Playgroud)
我现在需要做的是使用他们的SSL端口466.当我尝试它时,我得到正常输出详细说明消息,然后暂停约2分钟并咳嗽这个:
/usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/timeout.rb:60:in `rbuf_fill': execution expired (Timeout::Error)
from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/protocol.rb:126:in `readline'
from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/smtp.rb:911:in `recv_response'
from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/smtp.rb:554:in `do_start'
from /usr/local/rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/net/smtp.rb:921:in `critical' …Run Code Online (Sandbox Code Playgroud) 我在具有SELinux许可和IPtables关闭的CENTOS 5 VM上安装了testmail.rb:
require 'rubygems'
require 'mail'
options = { :address => "mail.domain.com",
:port => 466,
:domain => 'otherdomain.com',
:user_name => 'somedude@domain.com',
:password => 'topsecret',
:authentication => 'plain',
:enable_starttls_auto => true }
Mail.defaults do
delivery_method :smtp, options
end
mail = Mail.new do
from 'somedude@otherdomain.com'
to 'admin@domain.com'
subject 'This is a test email'
body File.read('body.txt')
end
puts mail.to_s
Run Code Online (Sandbox Code Playgroud)
运行脚本时的结果如下:
Date: Tue, 30 Nov 2010 12:12:58 -0500
From: somedude@otherdomain.com
To: admin@domain.com
Message-ID: <4cf5309a2f074_284015c5c4de91b8270b2@apvdbs03.3rdomain.local.mail>
Subject: This is a test email
Mime-Version: 1.0
Content-Type: …Run Code Online (Sandbox Code Playgroud) 我有一个带有一行的脚本:
ruby /root/backup_scripts/new_scripts/aapxen01.rb>>/volumes/backups/aapxen01/$date.log 2>&1
Run Code Online (Sandbox Code Playgroud)
这会生成一个名为".log"的日志文件,显然不是我想要的.如何将当前日期作为文件名生成?
字符>(或>>)可与Windows中的命令一起使用,以将命令的结果记录到文件中.Linux有这种能力吗?你怎么做呢?
示例:$ find /?> find.txt
此命令将在当前目录中生成名为find.txt的文件.在输入命令后,此文件将包含术语窗口中的确切内容:
Searches for a text string in a file or files.
FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] "string" [[drive:][path]filename[ ...]]
/V Displays all lines NOT containing the specified string.
/C Displays only the count of lines containing the string.
/N Displays line numbers with the displayed lines.
/I Ignores the case of characters when searching for the string.
/OFF[LINE] Do not skip files with offline attribute set.
"string" Specifies the text string to find.
[drive:][path]filename …Run Code Online (Sandbox Code Playgroud) 这是我试过的:
UPDATE `main` SET Practice = replace(Practice,""","");
Run Code Online (Sandbox Code Playgroud)
我在表格的主要部分中有杂散的引号,我正在尝试进行大规模执行.但是,我得到的只是语法错误消息.这种语法适用于其他类似的故意大屠杀,但不适用于此.