scp 复制文件到远端,从远端复制到本地
命令格式:
scp local_folder remote_username@remote_ip:remote_folder
scp remote_username@remote_ip:remote_folder local_folder
例子:
scp ~/Desktop/bahmni-icon.png root@128.199.74.218:/var/www/bahmni_config
可用参数:
-r 复制文件夹
-v 和大多数 linux 命令中的 -v 意思一样 , 用来显示进度 . 可以用来查看连接 , 认证 , 或是配置错误 .
-C 使能压缩选项 .
-P 选择端口 . 注意 -p 已经被 rcp 使用 .
-4 强行使用 IPV4 地址 .
-6 强行使用 IPV6 地址 .MAC 显示、不显示隐藏文件夹
defaults write com.apple.finder AppleShowAllFiles Yes && killall Finder //显示隐藏文件
defaults write com.apple.finder AppleShowAllFiles No && killall Finder //不显示隐藏文件find 命令使用
find ./test -name "*.php" 在特定目录查找文件
find / -name "" 查找当前路径下的所有文件
-amin n - The file was last accessed n minutes ago
-anewer - The file was last accessed more recently than it was modified
-atime n - The file was last accessed more n days ago
-cmin n - The file was last changed n minutes ago
-cnewer - The file was last changed more recently than the file was modified
-ctime n - The file was last changed more than n days ago
-empty - The file is empty
-executable - The file is executable
-false - Always false
-fstype type - The file is on the specified file system
-gid n - The file belongs to group with the ID n
-group groupname - The file belongs to the named group
-ilname pattern - Search for a symbolic line but ignore case
-iname pattern - Search for a file but ignore case
-inum n - search for a file with the specified node
-ipath path - search for a path but ignore case
-iregex expression - search for a expression but ignore case
-links n - search for a file with the specified number of links
-lname name - search for a symbolic link
-mmin n - file's data was last modified n minutes ago
-mtime n - file's data was last modified n days ago
-name name - search for a file with the specified name
-newer name - search for a file edited more recently than the file given
-nogroup - search for a file with no group id
-nouser - search for a file with no user attached to it
-path path - search for a path
-readable - find files which are readable
-regex pattern - search for files matching a regular expression
-type type - search for a particular type
-uid uid - files numeric user id is the same as uid
-user name - file is owned by user specified
-writable - search for files that can be written to
- lsof -i TCP:8080 查看所有8080端口下的TCP链接 (of = open file)