码迷,mamicode.com
首页 >  
搜索关键字:basename    ( 543个结果
控制终端, 用户登录、mail、hostname、随机数
控制终端console:控制台,直接接到主机上的显示器pty#:和控制台是在一块的(VGA)tty#:虚拟终端(VGA)ttys:串行终端没有vga也可显示pts/#:伪终端查看登录信息命令w查看当前系统所登录的用户,即正在干什么user,tty,从哪里登录过来,登录时间等等[root@localhostlog]#w11:06:01up..
分类:其他好文   时间:2015-05-19 15:04:30    阅读次数:166
python 加载外部文件
import sysimport osdef pySource(filePath): myFile=os.path.basename(filePath) dir=os.path.dirname(filePath) fileName=os.path.splitext(myFile)[...
分类:编程语言   时间:2015-05-18 16:34:09    阅读次数:129
python os.path模块
python os.path模块os.path.abspath(path) #返回绝对路径os.path.basename(path) #返回文件名os.path.commonprefix(list) #返回list(多个路径)中,所有path共有的最长的路径。os.path.dirname(pat...
分类:编程语言   时间:2015-05-18 16:12:28    阅读次数:199
自动添加和删除用户
#!/bin/bash##添加10个用户user1到user10,密码同用户名:但要求只有在用户不存在的情况下才能添加;#删除10个用户user1到user10if[$#-lt1];thenecho"Usage:`basename$0`ARG"exit7fiif[$1==add];thenforIin{1..10};doifiduser$I&>/dev/nullthenecho"theuser$Iexist."elseu..
分类:其他好文   时间:2015-05-17 02:18:44    阅读次数:124
自动添加和删除用户
#!/bin/bash##添加10个用户user1到user10,密码同用户名:但要求只有在用户不存在的情况下才能添加;#删除10个用户user1到user10if[$#-lt1];thenecho"Usage:`basename$0`ARG"exit7fiif[$1==add];thenforIin{1..10};doifiduser$I&>/dev/nullthenecho"theuser$Iexist."elseu..
分类:其他好文   时间:2015-05-17 02:16:37    阅读次数:205
get_ftp.sh
#!/bin/bashif[$#-ne2]thenecho"Usage:bash$0<remotedir><filename>"exit1fiIP=192.168.10.123REMOTEDIR=$1FILENAME=$2#local_filename=`basename$FULLNAME`#DESTFILE=$DESTDIR/$local_filenameftp-i-n<<FTPITopen$IPuserusernamepasswdbinpassivecd$REMOTED..
分类:其他好文   时间:2015-05-13 17:08:06    阅读次数:101
PHP 中获取文件名及路径
1. basename("/mnt/img/image01.jpg")函数:得到文件名;输出结果为:image01.jpg. 使用 basename($uriString) 我们可以得到一个包含扩展名的文件名; 如果不需要扩展名,也可以使用 basename($uriString, $extStr....
分类:Web程序   时间:2015-05-12 15:07:14    阅读次数:136
dirname basename 截取路径中的目录以及文件名
dirname basename 截取路径中的目录以及文件名windows 下面:#include "shlwapi.h"#pragma comment(lib, "shlwapi.lib ")LPTSTR PathFindFileName(LPCTSTR pPath)功能:获得路径中的文件名例:....
分类:其他好文   时间:2015-05-09 13:21:50    阅读次数:152
PHP CURL实现远程下载文件到本地
';print_r($result);function httpcopy($url,$file='',$timeout=60){ $file=empty($file)?pathinfo($url,PATHINFO_BASENAME):$file; $dir=pathinfo($file,...
分类:Web程序   时间:2015-05-09 07:42:24    阅读次数:170
PHP Filesystem 函数
函数描述basename()返回路径中的文件名部分。chgrp()改变文件组。chmod()改变文件模式。chown()改变文件所有者。clearstatcache()清除文件状态缓存。copy()复制文件。delete()参见unlink()或unset()。dirname()返回路径中的目录名称...
分类:Web程序   时间:2015-05-01 09:23:13    阅读次数:236
543条   上一页 1 ... 45 46 47 48 49 ... 55 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!