CentOS 7 - Runlevel change
Method one:
# systemctl get-default
multi-user.target
# systemctl set-default multi-user.target
# reboot
Second method:
# ls /lib/systemd/system/runlevel*target -l
lrwxrwxrwx. 1 root root 15 Aug 3 13:44 /lib/systemd/system/runlevel0.target -> poweroff.target
lrwxrwxrwx. 1 root root 13 Aug 3 13:44 /lib/systemd/system/runlevel1.target -> rescue.target
lrwxrwxrwx. 1 root root 17 Aug 3 13:44 /lib/systemd/system/runlevel2.target -> multi-user.target
lrwxrwxrwx. 1 root root 17 Aug 3 13:44 /lib/systemd/system/runlevel3.target -> multi-user.target
lrwxrwxrwx. 1 root root 17 Aug 3 13:44 /lib/systemd/system/runlevel4.target -> multi-user.target
lrwxrwxrwx. 1 root root 16 Aug 3 13:44 /lib/systemd/system/runlevel5.target -> graphical.target
lrwxrwxrwx. 1 root root 13 Aug 3 13:44 /lib/systemd/system/runlevel6.target -> reboot.target
# ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
# systemctl get-default
runlevel5.target
# reboot
Thursday, August 17, 2017
Thursday, August 3, 2017
find: paths must precede expression
[root@dns1 bashscripts]# find . -type f -name *.core -print
find: paths must precede expression: various1.core
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
[root@dns1 bashscripts]# find . -type f -name '*.core' -print
./various4.core
./various9.core
./various7.core
./various1.core
./various5.core
./various8.core
./various2.core
./various10.core
./various6.core
./various3.core
[root@dns1 bashscripts]# ls -l *.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various10.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various1.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various2.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various3.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various4.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various5.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various6.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various7.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various8.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various9.core
Note: Single quotes will stop wild cards from expanding the search.
find: paths must precede expression: various1.core
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
[root@dns1 bashscripts]# find . -type f -name '*.core' -print
./various4.core
./various9.core
./various7.core
./various1.core
./various5.core
./various8.core
./various2.core
./various10.core
./various6.core
./various3.core
[root@dns1 bashscripts]# ls -l *.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various10.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various1.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various2.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various3.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various4.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various5.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various6.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various7.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various8.core
-rw-r--r--. 1 root root 0 Apr 18 22:40 various9.core
Note: Single quotes will stop wild cards from expanding the search.
Subscribe to:
Posts (Atom)