#Shell函数
#函数定义
[root@localhost 0416]# vi hellofun
[root@localhost 0416]# cat hellofun
#!/bin/bash
#hellofun
function hello()
{
echo "Hello,today is `date`"
return 1
}
#无意义,不能执行
[root@localhost 0416]# chmod 755 hellofun
#函数调用
#拷贝文件
[root@localhost 0416]# cp hellofun func
#编辑
[root@localhost 0416]# vi func
#查看
[root@localhost 0416]# cat func
#!/bin/bash
#func
function hello()
{
echo "Hello,today is `date`"
}
echo "now going to the function hello"
hello
echo "back from the function"
#执行
[root@localhost 0416]# ./func
now going to the function hello
Hello,today is Tue Apr 16 15:30:43 CST 2013
back from the function
#参数传递
#编辑
[root@localhost 0416]# vi func2
#查看
[root@localhost 0416]# cat func2
#!/bin/bash
#func2
function hello()
{
#类似于位置参数
echo "Hello,$1 today is `date`"
}
echo "now going to the function hello"
hello chinaitlab
echo "back from the function"
#执行
[root@localhost 0416]# ./func2
now going to the function hello
Hello,chinaitlab today is Tue Apr 16 15:34:21 CST 2013
back from the function
#函数文件
#编辑
[root@localhost 0416]# vi func3
#查看
[root@localhost 0416]# cat func3
#!/bin/bash
#func3
#Source function
#可以包含其他文件或者其他函数
. hellofun
echo "now going to the function hello"
hello
echo "back from the function"
#执行
[root@localhost 0416]# ./func3
now going to the function hello
Hello,today is Tue Apr 16 15:43:31 CST 2013
back from the function
#启动文件,学习Shell看启动文件,修改前注意备份
#查看network文件
[root@localhost root]# cat /etc/rc.d/init.d/network
#查看functions文件
[root@localhost root]# cat /etc/rc.d/init.d/ functions
#检查载入函数和删除函数
#拷贝文件
[root@localhost 0416]# cp func3 func4
#拷贝文件
[root@localhost 0416]# cp func func4
#查看文件
[root@localhost 0416]# cat func4
#!/bin/bash
#func4
#Source function
. hellofun
set
echo "now going to the function hello"
hello
echo "back from the function"
#执行
[root@localhost 0416]# ./func4
BASH=/bin/bash
BASH_ENV=/root/.bashrc
BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="i386-redhat-linux-gnu")
BASH_VERSION='2.05b.0(1)-release'
CLASSPATH=.:/usr/java/jdk1.6.0_27/lib/dt.jar:/usr/java/jdk1.6.0_27/lib/tools.jar:/usr/java/jdk1.6.0_27/jre/lib/ext/mysql-connector-java-3.1.10-bin.jar
DIRSTACK=()
EUID=0
GROUPS=()
G_BROKEN_FILENAMES=1
HISTSIZE=1000
HOME=/root
HOSTNAME=localhost.localdomain
HOSTTYPE=i386
IFS=$' \t\n'
INPUTRC=/etc/inputrc
JAVA_HOME=/usr/java/jdk1.6.0_27
LAMHELPFILE=/etc/lam/lam-helpfile
LANG=en_US.en
LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN
LESSOPEN='|/usr/bin/lesspipe.sh %s'
LOGNAME=root
LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:'
MACHTYPE=i386-redhat-linux-gnu
MAIL=/var/spool/mail/root
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/java/jdk1.6.0_27/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
PIPESTATUS=([0]="0")
PPID=3541
PS4='+ '
PVM_ROOT=/usr/share/pvm3
PVM_RSH=/usr/bin/rsh
PWD=/home/wgb/shell/0416
QTDIR=/usr/lib/qt-3.1
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments
SHLVL=2
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT='192.168.223.1 2757 22'
SSH_CONNECTION='192.168.223.1 2757 192.168.223.100 22'
SSH_TTY=/dev/pts/0
TERM=vt100
UID=0
USER=root
USERNAME=root
XPVM_ROOT=/usr/share/pvm3/xpvm
_=hellofun
hello ()
{
echo "Hello,today is `date`";
return 1
}
now going to the function hello
Hello,today is Tue Apr 16 17:54:50 CST 2013
back from the function
#查看文件
[root@localhost 0416]# cat func5
#!/bin/bash
#func5
#Source function
. hellofun
set
unset hello
echo "now going to the function hello"
hello
echo "back from the function"
#执行
[root@localhost 0416]# ./func5
BASH=/bin/bash
BASH_ENV=/root/.bashrc
BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="i386-redhat-linux-gnu")
BASH_VERSION='2.05b.0(1)-release'
CLASSPATH=.:/usr/java/jdk1.6.0_27/lib/dt.jar:/usr/java/jdk1.6.0_27/lib/tools.jar:/usr/java/jdk1.6.0_27/jre/lib/ext/mysql-connector-java-3.1.10-bin.jar
DIRSTACK=()
EUID=0
GROUPS=()
G_BROKEN_FILENAMES=1
HISTSIZE=1000
HOME=/root
HOSTNAME=localhost.localdomain
HOSTTYPE=i386
IFS=$' \t\n'
INPUTRC=/etc/inputrc
JAVA_HOME=/usr/java/jdk1.6.0_27
LAMHELPFILE=/etc/lam/lam-helpfile
LANG=en_US.en
LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN
LESSOPEN='|/usr/bin/lesspipe.sh %s'
LOGNAME=root
LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:'
MACHTYPE=i386-redhat-linux-gnu
MAIL=/var/spool/mail/root
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/java/jdk1.6.0_27/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
PIPESTATUS=([0]="0")
PPID=3541
PS4='+ '
PVM_ROOT=/usr/share/pvm3
PVM_RSH=/usr/bin/rsh
PWD=/home/wgb/shell/0416
QTDIR=/usr/lib/qt-3.1
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments
SHLVL=2
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT='192.168.223.1 2757 22'
SSH_CONNECTION='192.168.223.1 2757 192.168.223.100 22'
SSH_TTY=/dev/pts/0
TERM=vt100
UID=0
USER=root
USERNAME=root
XPVM_ROOT=/usr/share/pvm3/xpvm
_=hellofun
hello ()
{
echo "Hello,today is `date`";
return 1
}
now going to the function hello
./func5: line 8: hello: command not found
back from the function
#查看文件
[root@localhost 0416]# cat func5
#!/bin/bash
#func5
#Source function
. hellofun
#set
unset hello
echo "now going to the function hello"
hello
echo "back from the function"
#执行
[root@localhost 0416]# ./func5
now going to the function hello
./func5: line 8: hello: command not found
back from the function
#函数返回状态值
#拷贝文件
[root@localhost 0416]# cp hellofun hellofunctions
#查看文件
[root@localhost 0416]# cat hellofunctions
#!/bin/bash
#hellofunctions
function hello()
{
echo "Hello,today is `date`"
return 1
}
#拷贝文件
[root@localhost 0416]# cp func func6
#查看文件
[root@localhost 0416]# cat func6
#!/bin/bash
#func6
. hellofunctions
echo "now going to the function hello"
hello
echo $?
echo "back from the function"
#返回0,正确执行,返回1,一般发生错误——约定
#执行
[root@localhost 0416]# ./func6
now going to the function hello
Hello,today is Tue Apr 16 18:02:56 CST 2013
1
back from the function
#查看文件
[root@localhost 0416]# cat hellofunctions
#!/bin/bash
#hellofunctions
function hello()
{
echo "Hello,today is `date`"
return 0
}
#执行
[root@localhost 0416]# ./func6
now going to the function hello
Hello,today is Tue Apr 16 18:02:56 CST 2013
0
back from the function
#查看文件
[root@localhost 0416]# cat func6
#!/bin/bash
#func6
. hellofunctions
echo "now going to the function hello"
returnvalue=hello
echo $?
#这样的赋值是不允许的
echo $returnvalue
echo "back from the function"
[root@localhost 0416]# ./func6
now going to the function hello
0
hello
back from the function
#编辑文件
[root@localhost 0416]# vi hellofunctions
#查看文件
[root@localhost 0416]# cat hellofunctions
#!/bin/bash
#hellofunctions
function hello()
{
echo "Hello,today is `date`"
return 127
}
#执行文件,根据文件返回值就可以做一些操作
[root@localhost 0416]# ./func6
now going to the function hello
127
back from the function
#文本过滤
#正则表达式
#基本元字符及其含义
#使用句点匹配单字符
#行首以^匹配字符串或字符序列
#行尾以$匹配字符串或字符
#用*匹配单字符或其重复序列
#用\(反斜杠)屏蔽一个特殊字符
#用[]匹配一个范围或集合
#用\{\}匹配模式结构出现的次数
#find命令
#locate亦可查找文件
#locate
#查看find帮助信息
man find
#正则表达式需要双引号引出
#没写路径默认当前路径
#找出txt文档并打印
#[root@localhost shell]# find -name "*.txt" -print
./0410/list.txt
./0410/names.txt
./0321/enerco/1.txt
./0321/enerco/2.txt
./0321/enerco/3.txt
./0321/enerco/4.txt
./0321/myfile.txt
./0321/myfile_dort.txt
./0323/myfile.txt
./0330/mylogfile.txt
./0330/dos.txt
./0330/ls.txt
./0330/partation.txt
./0330/name.txt
./0330/err_message.txt
./0330/term.txt
./0330/account_new.txt
./0330/standard.txt
./other/1.txt
./other/2.txt
./other/3.txt
./other/4.txt
#和上条命令等效
[root@localhost shell]# find ./-name "*.txt" –print
#在当前目录下查找(包括子目录)包含大写字母的文件并打印
[root@localhost shell]# find ./ -name "[A-Z]*" –print
#查找权限为755的文件并打印
[root@localhost shell]# find . -perm 755 -print
#验证权限是否为755
[root@localhost shell]# ls -l ./0330/file_desc
-rwxr-xr-x 1 root root 100 Mar 30 20:08 ./0330/file_desc
#在当前目录查找属主为root的文件并打印
[root@localhost shell]# find `pwd` -user root –print
#验证属主是否为root
[root@localhost shell]# ls -l /home/wgb/shell/0410/whilereadline
-rwxr-xr-x 1 root root 69 Apr 10 22:24 /home/wgb/shell/0410/whilereadline
#查看属主不在etc/passwd文件里的文件并打印
[root@localhost shell]# find `pwd` -nouser –print
#查找文件系统下所有属主不在etc/passwd文件里的文件并打印
[root@localhost shell]# find / -nouser -print>nouers.out
#后台执行上诉命令
[root@localhost shell]# nohup find / -nouser -print>nouers.out &
[1] 4752
#查找所属组名为root的文件并打印
[root@localhost shell]# find ./ -group root –print
#验证
[root@localhost shell]# ls -l ./other/1.txt
-rw-r--r-- 1 root root 93 Dec 7 16:23 ./other/1.txt
#查找没有组的文件并打印
[root@localhost shell]# find ./ -nogroup –print
#查找改变时间在5天以内的文件并打印
[root@localhost shell]# find /var -mtime -5 –print
#验证
[root@localhost shell]# ls -l
/var/spool/slrnpull/news/clari/world/europe/iberia/.overview
-rw-r--r-- 1 news news 0 Apr 13 18:11 /var/spool/slrnpull/news/clari/world/europe/iberia/.overview
#查看当前日期,以验证
[root@localhost shell]# date
Sat Apr 13 18:48:07 CST 2013
#查找改变时间在3天以前的文件并打印
[root@localhost shell]# find /var -mtime +3 –print
#验证
[root@localhost shell]# ls -l /var/www/error/contact.html.var
-rw-r--r-- 1 root root 1220 Jul 16 2002 /var/www/error/contact.html.var
#查找改变时间在1天以内的文件
[root@localhost shell]# find /var -mtime -1 –print
#查看file1的详细信息
[root@localhost shell]# ls -l ./0331/test/file1
-rw-rw-r-- 1 root root 0 Mar 31 11:36 ./0331/test/file1
#查看myfile的详细信息
[root@localhost shell]# ls -l ./0410/myfile
-rw-r--r-- 1 root root 18 Apr 10 21:51 ./0410/myfile
#查找比file1新比myfile旧的文件并打印
[root@localhost shell]# find `pwd` -newer "./0331/test/file1" ! -newer ./0410/"myfile" –print
#验证
[root@localhost shell]# ls -l /home/wgb/shell/0410/forlist4
-rwxr-xr-x 1 root root 67 Apr 10 21:49 /home/wgb/shell/0410/forlist4
#查找etc目录下为目录的文件夹并打印
[root@localhost shell]# find /etc -type d –print
#查找etc目录下类型为连接的文件并打印
[root@localhost shell]# find /etc -type l –print
#查找大于1M的文件,c表示字节并打印
[root@localhost shell]# find . -size +1000000c –print
#大于10个块的文件并打印
[root@localhost shell]# find . -size +10 –print
#验证
[root@localhost shell]# ls -l ./0330/ls.txt
-rw-r--r-- 1 root root 6021 Mar 30 19:12 ./0330/ls.txt
#先匹配所有的文件,再在子目录中查找
[root@localhost shell]# find / -name "CON.FILE" -depth –print
#注意空格,查找etc目录下为目录的文件夹并列出详细信息
[root@localhost shell]# find . -type f -exec ls -l {} \;
#删除5天前的log文件
[root@localhost shell]# find . -name "*.log" -mtime +5 -ok rm{} \;
[root@localhost shell]# ls -l /var/log
#xargs:只有一个进程减少系统消耗
#查找权限为777的文件并打印
[root@localhost shell]# find ./ -perm -7 -print
./0321/direactory1
./0321/enercolns
[root@localhost shell]# ls -l ./0321/enercolns
lrwxrwxrwx 1 root root 13 Mar 21 16:15 ./0321/enercolns -> enerco.tar.gz
#将查找结果改为775
[root@localhost shell]# find ./ -perm -7 -print | xargs chmod o-w
#查看文件类型
[root@localhost shell]# find ./ -type f -print | xargs file
#grep 模式查找
#在当前目录下所有txt文档中查找包含jenny的文件并打印
[root@localhost shell]# grep "jenny" *.txt
#在当前目录下所有文件中查找包含sort it的文件并打印
[root@localhost shell]# grep "sort it" *
#在myfile文件中统计2004出现的次数
[root@localhost shell]# grep -c "2004" myfile
2
#在myfile文件中统计2004出现的次数并打印行号
[root@localhost shell]# grep -n "2004" myfile
#在myfile文件查找JUl并打印(不区分大小写)
[root@localhost 0415]# grep -i "JUl" myfile
#过滤,在myfile文件查找不包含2004:22的内容
[root@localhost 0415]# grep -v "2004:22" myfile
#在myfile文件查找在2004:22:50--22::22:59时间段的内容
[root@localhost 0415]# grep "2004:22:5[0-9]" myfile
#在myfile文件查找不是210开头的内容
[root@localhost 0415]# grep "^[^210]" myfile
#在myfile文件查找以H开头,P结尾的内容
[root@localhost 0415]# grep "H*P" myfile | more
#在myfile文件查找匹配正则表达式[5-8][6-9][0-3]的内容
[root@localhost 0415]# grep "[5-8][6-9][0-3]" myfile|more
#在myfile文件查找匹配正则表达式4\{2\}的内容
[root@localhost 0415]# grep "4\{2\}" myfile
443
#在myfile文件查找匹配正则表达式4\{2,4\}的内容
[root@localhost 0415]# grep "4\{2,4\}" myfile
#在myfile文件查找所有空行
[root@localhost 0415]# grep "^$" myfile
#在myfile文件查找包含问号的内容
[root@localhost 0415]# grep "\?" myfile
[root@localhost 0415]# ls -l>lsout.txt
#在lsout.txt文件中查找为目录的文件
[root@localhost 0415]# grep "^d" lsout.txt
##在lsout.txt文件中查找不是目录的文件
[root@localhost 0415]# grep "^[^d]" lsout.txt
##在lsout.txt文件中查找不是目录、连接、管道的文件
[root@localhost 0415]# grep "^[^dlp]" lsout.txt
##在myfile文件中查找500-599的数字
[root@localhost 0415]# grep "5[[:digit:]][[:digit:]]" myfile
#在myfile文件中查找IP地址,只能是3位数的
[root@localhost 0415]# grep "[0-9]\{3\}\.[[0-9]\{3\}\.[0-9]\{3\}\.[0-9]\{3\}" myfile
#在myfile文件中查找所有IP地址
[root@localhost 0415]# grep "[0-9]\{1,3\}\.[[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}" myfile
#在myfile文件中查找包含php的内容
[root@localhost 0415]# grep "php" myfile
#在myfile文件中统计配php文件的个数
[root@localhost 0415]# grep "php" myfile| wc -l
0
#在myfile文件中统计htm/call_info.php出现的次数
[root@localhost 0415]# grep "htm/call_info.php" myfile| wc –l
#AWK 工具
#打印score.txt第一列的内容并将此写入score.out中
[root@localhost 0415]# awk '{print $0}' score.txt |tee score.out
89
88
99
100
99
89
99
#将默认的域分隔符(空格)改为分号,功能同上
[root@localhost 0415]# awk -F : '{print $0}' score.txt |tee score.out
#打印score.txt第一列、第四列的内容并将此写入score.out中,并以制表符作为间隔,但是执行出错
[root@localhost 0415]# awk -F : '{print $1\t$4}' score.txt |tee score.out
awk: cmd. line:1: {print $1\t$4}
awk: cmd. line:1: ^ backslash not last character on line
#\t是字符,用双引号括起来,功能同上
[root@localhost 0415]# awk -F : '{print $1"\t"$4}' score.txt |tee score.out
#分页显示,功能同上
[root@localhost 0415]# awk -F : '{print $1"\t"$4}' score.txt |more
#域分隔符可以任意
[root@localhost 0415]# awk -F +0800 '{print $1}' score.txt|more
#BEGIN和END的使用
[root@localhost 0415]# awk 'BEGIN {print "Name Maths\n----
----"} {print $1"\t"$4} END { print "end-of-report"}' score.txt
#功能类似上条加上分页
[root@localhost 0415]# awk 'BEGIN {print "IP Date\n--------"} {print $1"\t"$4} END { print "end-of-report"}' score.txt |more
#致歉:第五章文本过滤1:18:34以后出错,不能播放,所以后面的内容暂时没有。
在部署过程中、文件的读写权限是比教容易出错
本博文按以下 6 个方面展开、但重点放在文件权限上、
● 原理
● /etc/exports
● 文件权限
● Server/Client 配置
● 2 个常用命令
● Troubleshoting
● 经验建议
㈠ 原理
所谓一图胜千言、有图有真相
Rocky 便随大流啦、放 2 张图片
值得注意的是、启动 NFS 之前、portmap 要先启动
㈡ /etc/exports
NFS 的部署其实很简单、分 3 步走战略:配置/etc/exports → 启动 portmap → 启动 NFS
那么、万里长征第一步:配置 /etc/exports
这个配置文件很简单、每一行最前面是要共享出来的目录
然后、是这个目录可以依照不同的权限共享给不同的主机
比如:
/tmp/rokcy 192.168.1.0/24(ro) *.fjnu.edu.com(rw,sync)
格式说明:小括号()是设置权限参数的位置、主机名与小括号是连在一起
主机名的设置主要有几个方式:
● 可以使用完整的 IP 或者 网段、例如:192.168.1.110 或 192.168.1.0/24
● 可以使用主机名称、不过这个名称要在/etc/hosts 或 DNS 里能找到、对于主机名支持通配符的使用、如* 或 ?
权限方面的常见参数有:
rw :读写;
ro :只读;
sync :同步模式,内存中数据时时写入磁盘;
async :不同步,把内存中数据定期写入磁盘中;
no_root_squash :加上这个选项后,root用户就会对共享的目录拥有至高的权限控制,就像是对本机的目录操作一样。不安全,不建议使用;
root_squash :和上面的选项对应,root用户对共享目录的权限不高,只有普通用户的权限,即限制了root;
all_squash :不管使用NFS的用户是谁,他的身份都会被限定成为一个指定的普通用户身份;
anonuid/anongid :要和root_squash 以及 all_squash一同使用,用于指定使用NFS的用户限定后的uid和gid,前提是本机的/etc/passwd中存在这个uid和gid
㈢ 文件权限
对于一个文件的写入权限、需要满足:
(1)使用者账号,亦即 UID 的相关身份
(2)NFS 服务器允许有写入的权限
(3)文件系统确实具有 w 的权限
㈣ 2 个命令
① 在Client端使用:
showmount -e IP或主机名
查看可挂载的目录
② 在Server端使用:
重新配置/etc/exports后可用:
exportfs -avr
㈤ Troubleshoting
① 用户或客户端身份权限不符
[root@linux ~]# mount -t nfs localhost:/home/test /home/nfs mount: localhost:/home/test failed, reason given by server: Permission denied
解决方案:
如果确定您的 IP 没有错误,那么请通知服务器端, 请管理员将你的 IP 加入 /etc/exports
② 服务器或客户端某些服务未启动:
[root@linux ~]# mount -t nfs localhost:/home/test /home/nfs mount: RPC: Port mapper failure - RPC: Unable to receive [root@linux ~]# mount -t nfs localhost:/home/test /home/nfs mount: RPC: Program not registered
解决方案:
要嘛就是 portmap 忘记开,要嘛就是服务器端的 nfs 忘记开!解决的方法就是去启动这两个咚咚啦!
③ 被防火墙档掉了:
这个也很容易忘记了!那就是重新设定一下您的防火墙,这包含了两部份,包括 iptables 与 TCP_Wrappers !
因为我们启动了 portmap ,这个东西有两个数据需要分享出来,一个是 port 111 需要提供出去,
因此您的 iptables 规则当中,需要开放这个 port 喔
㈥ 经验建议
如果 NFS 在高速环境下运行的话、建议加上:
mount -t nfs -o nosuid,noexec,nodev,rw,bg,soft,rsize=32768,wsize=32768