Microsoft文档

  1. 创建文件
1
2
3
4
5
6
7
8
9
PS C:\> New-Item test-file


目录: C:\


Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2022/5/26 16:50 0 test-file
  1. 显示文件的创建、最后修改、最后访问时间
1
2
3
4
5
6
7
8
9
10
11
12
13
PS C:\> (ls test-file).CreationTimeUtc

20225268:50:31


PS C:\> (ls test-file).LastAccessTimeUtc

20225268:50:31


PS C:\> (ls test-file).LastWriteTimeUtc

20225268:50:31
  1. 修改文件时间属性
1
2
3
PS C:\> (ls test-file).CreationTimeUtc="2018-05-17 13:23:45"
PS C:\> (ls test-file).LastWriteTimeUtc="2018-05-17 13:23:45"
PS C:\> (ls test-file).LastAccessTimeUtc="2018-05-17 13:23:45"


应用:Linux服务器在没有音频输出和显示输出的情况下,利用蜂鸣器可以快速判断启动状况。

添加systemd服务:

/etc/systemd/system/beep-up.service

1
2
3
4
5
6
7
8
9
10
11
[Unit]
Description=Beep after system start
DefaultDependencies=no
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/usr/bin/beep -f 3000 -l 100 -n -f 3500 -l 100 -r 2

[Install]
WantedBy=multi-user.target

/etc/systemd/system/beep-down.service

1
2
3
4
5
6
7
8
9
10
11
[Unit]
Description=Beep before system shutdown
DefaultDependencies=no
Before=exit.target

[Service]
Type=oneshot
ExecStart=/usr/bin/beep -f 3000 -l 100 -r 2 -n -f 2000 -l 150

[Install]
WantedBy=reboot.target halt.target poweroff.target

最后启用 beep-up.service 和 beep-down.service



  1. LAN接口设置
1
2
3
4
5
6
7
8
9
10
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option ra 'relay'
option dhcpv6 'relay'
option ndp 'relay'
list ra_flags 'none'
  1. WAN6接口设置
1
2
3
4
5
6
7
8
config dhcp 'wan6'
option interface 'wan6'
option ignore '1'
option ra 'relay'
option dhcpv6 'relay'
option ndp 'relay'
option master '1'
list ra_flags 'none'

然后openwrt下的设备就可以正常获取ipv6地址了

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

0%