Archive | unix RSS for this section

set IP address manually in Synology NAS via command

1. “vi /etc/sysconfig/network-scripts/ifcfg-eth0”
With an example config below:
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=<ip address>
NETMASK=<netmask eg.255.255.240.0>
2. After modifying IPADDR and NETMASK information, use the next command for changes to take effect.
“/etc/rc.network restart”

How to generate date in Unix/Linux?

# date +"%b %d" -d today
Feb 15
# date +"%b %d" -d "last week"
Feb 08
# date +"%b %d" -d "last month"
Jan 15