find 命令给出以下输出:
[root@localhost /]# find var/log/ -iname anaconda.* var/log/anaconda.log var/log/anaconda.xlog var/log/anaconda.yum.log var/log/anaconda.syslog var/log/anaconda.program.log var/log/anaconda.storage.log
与 tar 结合后,它显示了这个输出:
[root@localhost /]# find var/log/ -iname anaconda.* -exec tar -cvf file.tar {} \; var/log/anaconda.log var/log/anaconda.xlog var/log/anaconda.yum.log var/log/anaconda.syslog var/log/anaconda.program.log var/log/anaconda.storage.log
但是在列出 tar 文件时它只显示一个文件
[root@localhost /]# tar -tvf file.tar -rw------- root/root 208454 2012-02-27 12:01 var/log/anaconda.storage.log
我在这里做错了什么?
使用 xargs 我得到这个输出:
[root@localhost /]# find var/log/ -iname anaconda.* | xargs tar -cvf file1.tar
在var 前面键入/时,意味着find /var/log
为什么它会给出此消息tar:从成员名称中删除前导 `/'
[root@localhost /]# find /var/log/ -iname anaconda.* …
我创建了一个分区,我想将该分区挂载到这个目录 /home/max/VirtualBox VMs
我在 fstab 中写了这一行:
/dev/sda4 /home/max/VirtualBox\ VMs ext4 默认值 0 0
但它给出了这个错误
[mntent]:/etc/fstab 中的第 16 行是错误的
我知道我收到此错误是因为“virtualBox VM”之间存在空间
是否可以挂载到该目录?
[max@localhost VirtualBox VMs]$ pwd /home/max/VirtualBox 虚拟机
我在服务器中安装了tigervnc-server 包。
[root@localhost ~]# rpm -qa Tigervnc-server Tigervnc-server-1.1.0-5.el6.i686
创建了一个 vnc 用户并为该用户创建了 vncpasswd。
[root@localhost ~]# useradd vnc [root@localhost ~]# vncpasswd vnc 密码: 核实: [root@localhost ~]#
在/etc/sysconfig/vncserver
我改变了这两行
VNCSERVERS="2:vnc" VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"
之后我重新启动了vncserver
服务
[root@localhost ~]# service vncserver restart 关闭 VNC 服务器:2:vnc [OK] 启动 VNC 服务器:2:vnc 新的 'localhost.localdomain:2 (vnc)' 桌面是 localhost.localdomain:2 启动 /home/vnc/.vnc/xstartup 中指定的应用程序 日志文件是 /home/vnc/.vnc/localhost.localdomain:2.log [ 好的 ]
清iptables
还。
[root@localhost ~]# iptables -F
在客户端运行 vncviewer 时出现此错误
[root@client ~]# vncviewer 10.10.2.39:2
如何解决这个错误?
我正在尝试更改上传目录的 selinux 上下文以启用匿名上传。
这是目录路径 /var/ftp/upload
这是默认上下文
[root@server ftp]# ls -Z 上传 drwxr-xr-x。root root unconfined_u:object_r:public_content_t:s0 上传
我试过这个命令来改变目录的类型
[root@server ftp]# semanage fcontext -a -t public_content_rw_t 上传
[root@server ftp]# restorecon -v 上传
它没有改变,这里有什么错误?
[root@server ftp]# ls -Z pub drwxr-xr-x。root root unconfined_u:object_r:public_content_t:s0 上传
我在服务器中安装了tigervnc-server 包。
[root@localhost ~]# rpm -qa Tigervnc Tigervnc-1.1.0-16.el6.x86_64
创建了一个 vnc 用户并为该用户创建了 vncpasswd。
[root@localhost ~]# useradd vnc [root@localhost ~]# vncpasswd vnc 密码: 核实: [root@localhost ~]#
在 /etc/sysconfig/vncserver 我改变了这两行
VNCSERVERS="2:vnc" VNCSERVERARGS[2]="-geometry 800x600"
启动服务时出现此错误。
[root@localhost ~]# service vncserver start 启动 VNC 服务器:2:vnc 您将需要密码才能访问您的桌面。 getpassword 错误:设备的 ioctl 不合适 密码:[失败] [root@localhost ~]#
为什么我收到这个错误?
如果你cal 9 1752
在 Linux 终端中输入,你会得到奇怪的输出。例如:
[max@avi ~]$ cal 9 1752
September 1752
Su Mo Tu We Th Fr Sa
1 2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Run Code Online (Sandbox Code Playgroud)
你有没有注意到从 3 到 13 的日期不见了?为什么会这样?我正在使用 CentOS 6.2。
我正在尝试使用 GUI 在 Ubuntu 16.04 中访问 Windows 共享。
我可以在 ubuntu 14.04 中访问相同的共享。在 Ubuntu 16 中,每当我输入 smb:// 时,它都会生成错误,提示“无法识别此文件服务器类型”是什么问题?
我正在使用 CentOS 6.2。在 uname(即man uname
)的手册页中,它说:
-r, --kernel-release
print the kernel release
-v, --kernel-version
print the kernel version
Run Code Online (Sandbox Code Playgroud)
在尝试命令时,它显示
[max@localhost ~]$ uname -r
2.6.32-220.17.1.el6.i686
[max@localhost ~]$ uname -v
#1 SMP Tue May 15 22:09:39 BST 2012
Run Code Online (Sandbox Code Playgroud)
-v
应该显示版本吧?但是它在哪里显示版本?-r
正在显示版本详细信息。
为什么会这样?
什么是 Linux 中的 PAM(可插拔身份验证模块)?我知道它用于身份验证,但这有什么用?它是如何工作的?
我正在使用 CentOS 6.2。