分类目录归档:Linux

程序动态函数库解析

ldd [-vdr] [fildname]

ldd /usr/bin/passwd

    linux-vdso.so.1 =>  (0x00007fffabbc2000)
libuser.so.1 => /lib64/libuser.so.1 (0x00007f72a8c58000)
libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f72a8a08000)
libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f72a86f1000)
libpopt.so.0 => /lib64/libpopt.so.0 (0x00007f72a84e7000)
libpam.so.0 => /lib64/libpam.so.0 (0x00007f72a82d8000)
libpam_misc.so.0 => /lib64/libpam_misc.so.0 (0x00007f72a80d3000)
libaudit.so.1 => /lib64/libaudit.so.1 (0x00007f72a7eaa000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f72a7c83000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f72a7a66000)
libc.so.6 => /lib64/libc.so.6 (0x00007f72a7699000)
libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00007f72a7495000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f72a725d000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f72a6ffb000)
libffi.so.6 => /lib64/libffi.so.6 (0x00007f72a6df3000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f72a6bee000)
libcap-ng.so.0 => /lib64/libcap-ng.so.0 (0x00007f72a69e8000)
/lib64/ld-linux-x86-64.so.2 (0x00005589b1a5b000)
libfreebl3.so => /lib64/libfreebl3.so (0x00007f72a67e4000)
0

Linux任务在前后台切换

举个栗子,你正在撸代码编辑一个index.php文件,vim index.php

突然想去找一个路径或者去系统里面干点别的啥事。这个时候又不想放弃正在写的index.php。此时退出vim的insert模式—按下esc,再按下ctrl+z,将正在进行的vim切到后台任务去。

好了,你已经知道了路径了,你按下jobs可以查看后台运行的任务。假设你输入job得到如下显示[1] + 3360 suspended vim index.php,中括号里的就是jobnumber,这里是1,按下命令行中输入fg %1,好了,又可以撸代码了~~~

0

centos7 调整时区

查看当前时间设置的状态:

[root@localhost logs]# timedatectl status
Local time: 三 2019-01-09 20:50:09 EST
  Universal time: 四 2019-01-10 01:50:09 UTC
        RTC time: 四 2019-01-10 02:50:08
       Time zone: America/New_York (EST, -0500)
     NTP enabled: no
NTP synchronized: no
 RTC in local TZ: no
      DST active: no
 Last DST change: DST ended at
                  日 2018-11-04 01:59:59 EDT
                  日 2018-11-04 01:00:00 EST
 Next DST change: DST begins (the clock jumps one hour forward) at
                  日 2019-03-10 01:59:59 EST
                  日 2019-03-10 03:00:00 EDT

设置为上海时区:

timedatectl set-timezone Asia/Shanghai
0