小编Hid*_*cum的帖子

用下划线替换文件名中的括号和空格

我用这一行删除文件夹名称上的空格

find /tmp/ -depth -name "* *" -execdir rename 's/ /_/g' "{}" \;
Run Code Online (Sandbox Code Playgroud)

有没有办法从文件名中删除空格和括号并添加下划线?

例如,我有:

|-- a_dir
|   `-- (1) file with spaces and parentheses.pdf
`-- b_dir
    |-- (43) another file with spaces (1).pdf
    `-- (132) yet another file with spaces (3343).pdf
Run Code Online (Sandbox Code Playgroud)

必须成为

|-- a_dir
|   `-- 1_file_with_spaces_and_parentheses.pdf
`-- b_dir
    |-- 43_another_file_with_spaces_1.pdf
    `-- 132_yet_another_file_with_spaces_3343.pdf
Run Code Online (Sandbox Code Playgroud)

linux shell

4
推荐指数
1
解决办法
3592
查看次数

2037年后存储MySQL日期的正确方法

我试图在 MySQL 中存储一个date()字段,一个连续的日期到2037 年

例如: 2065-12-01

问题是该字段正在返回: 1969-12-31

在 DB 上记录这些值的正确方法是什么?我应该使用VARCHAR吗?

date像这样计算字段的值:

 $future_date = date('Y-m-d', strtotime("+$number_years_to_add years"));
Run Code Online (Sandbox Code Playgroud)

php mysql database datetime year2038

4
推荐指数
1
解决办法
1115
查看次数

来自浏览器的过时加密警告

我已经用Apache 2.4和SSL启动了Windows Server.当我连接https://www.example.com并点击绿色锁定时,我有消息:

您与网站的连接是使用过时的加密技术加密的

请问有什么建议吗?

以下是ssl.conf:

    #
    # This is the Apache server configuration file providing SSL support.
    # It contains the configuration directives to instruct the server how to
    # serve pages over an https connection. For detailed information about these 
    # directives see <URL:http://httpd.apache.org/docs/2.4/mod/mod_ssl.html>
    # 
    # Do NOT simply read the instructions in here without understanding
    # what they do.  They're here only as hints or reminders.  If you are unsure
    # consult the …
Run Code Online (Sandbox Code Playgroud)

apache ssl openssl

2
推荐指数
1
解决办法
6306
查看次数

标签 统计

apache ×1

database ×1

datetime ×1

linux ×1

mysql ×1

openssl ×1

php ×1

shell ×1

ssl ×1

year2038 ×1