资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

linux上传代码命令 Linux编译代码的命令

请教Linux系统下上传文件代码怎么实现

SecureCRT与SshClient不同的就是,SecureCRT没有图形化的文件传输工具,不过也不影响,用命令来实现的话,其实会方便快捷很多。 第一种方式: 上传文件只需在shell终端仿真器中输入命令“rz”

成都创新互联公司坚持“要么做到,要么别承诺”的工作理念,服务领域包括:做网站、网站设计、企业官网、英文网站、手机端网站、网站推广等服务,满足客户于互联网时代的湄潭网站设计、移动媒体设计的需求,帮助企业找到有效的互联网解决方案。努力成为您成熟可靠的网络建设合作伙伴!

linux怎样命令行上传git

你是你是要通过git命令上传东西,还是想上传git到服务器上面,你可以先通过yum安装git

# yum install git

已加载插件:fastestmirror, refresh-packagekit, security

设置安装进程

Loading mirror speeds linuxprobe.com from cached hostfile

base                                                                                                            | 3.7 kB     00:00     

epel                                                                                                            | 4.3 kB     00:00     

epel/primary_db                                                                                                 | 5.9 MB     00:05     

extras                                                                                                          | 3.4 kB     00:00     

hhvm                                                                                                            | 2.9 kB     00:00     

shells_fish_release_2                                                                                           | 1.2 kB     00:00     

updates                                                                                                         | 3.4 kB     00:00     

updates/primary_db                                                                                              | 821 kB     00:01     

upgrade                                                                                                         | 1.9 kB     00:00     

virtualbox/signature                                                                                            |  181 B     00:00     

virtualbox/signature                                                                                            | 1.1 kB     00:00 ... 

包 git-1.7.1-8.el6.x86_64 已安装并且是最新版本

无须任何处理

#git --help

usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]

[-p|--paginate|--no-pager] [--no-replace-objects]

[--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]

[--help] COMMAND [ARGS]

The most commonly used git commands are:

add        Add file contents to the index

bisect     Find by binary search the change that introduced a bug

branch     List, create, or delete branches

checkout   Checkout a branch or paths to the working tree

clone      Clone a repository into a new directory

commit     Record changes to the repository

diff       Show changes between commits, commit and working tree, etc

fetch      Download objects and refs from another repository

grep       Print lines matching a pattern

init       Create an empty git repository or reinitialize an existing one

log        Show commit logs

merge      Join two or more development histories together

mv         Move or rename a file, a directory, or a symlink

pull       Fetch from and merge with another repository or a local branch

push       Update remote refs along with associated objects

rebase     Forward-port local commits to the updated upstream head

reset      Reset current HEAD to the specified state

rm         Remove files from the working tree and from the index

show       Show various types of objects

status     Show the working tree status

tag        Create, list, delete or verify a tag object signed with GPG

See 'git help COMMAND' for more information on a specific command.

下面我给介绍一种从本地上传到服务器的命令:

命令rz和sz命令,首先你需要安装lrzsz库

#rz --help

rz version 0.12.20

Usage: rz [options] [filename.if.xmodem]

Receive files with ZMODEM/YMODEM/XMODEM protocol

(X) = option applies to XMODEM only

(Y) = option applies to YMODEM only

(Z) = option applies to ZMODEM only

-+, --append                append to existing files

-a, --ascii                 ASCII transfer (change CR/LF to LF)

-b, --binary                binary transfer

-B, --bufsize N             buffer N bytes (N==auto: buffer whole file)

-c, --with-crc              Use 16 bit CRC (X)

-C, --allow-remote-commands allow execution of remote commands (Z)

-D, --null                  write all received data to /dev/null

--delay-startup N       sleep N seconds before doing anything

-e, --escape                Escape control characters (Z)

-E, --rename                rename any files already existing

--errors N              generate CRC error every N bytes (debugging)

-h, --help                  Help, print this usage message

-m, --min-bps N             stop transmission if BPS below N

-M, --min-bps-time N          for at least N seconds (default: 120)

-O, --disable-timeouts      disable timeout code, wait forever for data

--o-sync                open output file(s) in synchronous write mode

-p, --protect               protect existing files

-q, --quiet                 quiet, no progress reports

-r, --resume                try to resume interrupted file transfer (Z)

-R, --restricted            restricted, more secure mode

-s, --stop-at {HH:MM|+N}    stop transmission at HH:MM or in N seconds

-S, --timesync              request remote time (twice: set local time)

--syslog[=off]          turn syslog on or off, if possible

-t, --timeout N             set timeout to N tenths of a second

-u, --keep-uppercase        keep upper case filenames

-U, --unrestrict            disable restricted mode (if allowed to)

-v, --verbose               be verbose, provide debugging information

-w, --windowsize N          Window is N bytes (Z)

-X  --xmodem                use XMODEM protocol

-y, --overwrite             Yes, clobber existing file if any

--ymodem                use YMODEM protocol

-Z, --zmodem                use ZMODEM protocol

short options use the same arguments as the long ones

#sz --help

sz version 0.12.20

Usage: sz [options] file ...

or: sz [options] -{c|i} COMMAND

Send file(s) with ZMODEM/YMODEM/XMODEM protocol

(X) = option applies to XMODEM only

(Y) = option applies to YMODEM only

(Z) = option applies to ZMODEM only

-+, --append                append to existing destination file (Z)

-2, --twostop               use 2 stop bits

-4, --try-4k                go up to 4K blocksize

--start-4k              start with 4K blocksize (doesn't try 8)

-8, --try-8k                go up to 8K blocksize

--start-8k              start with 8K blocksize

-a, --ascii                 ASCII transfer (change CR/LF to LF)

-b, --binary                binary transfer

-B, --bufsize N             buffer N bytes (N==auto: buffer whole file)

-c, --command COMMAND       execute remote command COMMAND (Z)

-C, --command-tries N       try N times to execute a command (Z)

-d, --dot-to-slash          change '.' to '/' in pathnames (Y/Z)

--delay-startup N       sleep N seconds before doing anything

-e, --escape                escape all control characters (Z)

-E, --rename                force receiver to rename files it already has

-f, --full-path             send full pathname (Y/Z)

-i, --immediate-command CMD send remote CMD, return immediately (Z)

-h, --help                  print this usage message

-k, --1k                    send 1024 byte packets (X)

-L, --packetlen N           limit subpacket length to N bytes (Z)

-l, --framelen N            limit frame length to N bytes (l=L) (Z)

-m, --min-bps N             stop transmission if BPS below N

-M, --min-bps-time N          for at least N seconds (default: 120)

-n, --newer                 send file if source newer (Z)

-N, --newer-or-longer       send file if source newer or longer (Z)

-o, --16-bit-crc            use 16 bit CRC instead of 32 bit CRC (Z)

-O, --disable-timeouts      disable timeout code, wait forever

-p, --protect               protect existing destination file (Z)

-r, --resume                resume interrupted file transfer (Z)

-R, --restricted            restricted, more secure mode

-q, --quiet                 quiet (no progress reports)

-s, --stop-at {HH:MM|+N}    stop transmission at HH:MM or in N seconds

--tcp                   build a TCP connection to transmit files

--tcp-server            open socket, wait for connection

-u, --unlink                unlink file after transmission

-U, --unrestrict            turn off restricted mode (if allowed to)

-v, --verbose               be verbose, provide debugging information

-w, --windowsize N          Window is N bytes (Z)

-X, --xmodem                use XMODEM protocol

-y, --overwrite             overwrite existing files

-Y, --overwrite-or-skip     overwrite existing files, else skip

--ymodem                use YMODEM protocol

-Z, --zmodem                use ZMODEM protocol

short options use the same arguments as the long ones

More information can be used for reference linuxprobe.com。

怎样往linux社区提交代码

方法如下:

1、在本地仓库创建一个项目;

2、在第一次提交代码都需要进行添加,右键项目,选择TortoiseSVN ;

3、然后选择add选项;

4、通过选择项目内文件哪些需要提交和不需要提交;

5、确认上传的项目相关文件和路径,点击ok,即添加完成;

6、提交本地仓库的代码,右键项目文件,选择svn commit;

7、输入提交代码备注信息,以便同事查看时,是属于什么内容。这里可以选择哪些文件是要提交到代码仓库上;

8、点击ok之后,需要输入用户名和密码;

9、显示下列信息说明代码提交到中央仓库成功;

Linux文件传输命令有哪些

Linux下几种文件传输命令 sz rz sftp scp介绍

1.sftp

Secure Ftp

是一个基于SSH安全协议的文件传输管理工具。由于它是基于SSH的,会在传输过程中对用户的密码、数据等敏感信息进行加密,因此可以有效的防止用户信息

在传输的过程中被窃取,比FTP有更高的安全性。在功能方面与FTP很类似,不仅可以传输文件数据,而且可以进行远程的文件管理(如建立,删除,查看文件

列表等操作)。Sftp与ftp虽然只有一字之差,但基于的传输协议却是不同的。因此不能用sftp client去连接ftp server 也不能用

ftp client 去连接 sftp server。

建立连接:sftp user@host

从本地上传文件:put localpath

下载文件:get remotepath

与远程相对应的本地操作,只需要在命令前加上”l” 即可,方便好记。

例如:lcd lpwd lmkdir

2.scp

SCP :secure copy (remote file copy program) 也是一个基于SSH安全协议的文件传输命令。与sftp不同的是,它只提供主机间的文件传输功能,没有文件管理的功能。

复制local_file 到远程目录remote_folder下

scp local_file remote_user@host:remote_folder

复制local_folder 到远程remote_folder(需要加参数 -r 递归)

scp –r local_folder remote_user@host:remote_folder

以上命令反过来写就是远程复制到本地

3.sz/rz

sz/rz 是基于ZModem传输协议的命令。对传输的数据会进行核查,并且有很好的传输性能。使用起来更是非常方便,但前提是window端需要有能够支持ZModem的telnet或者SSH客户端,例如secureCRT。

首先需要在secureCRT中可以配置相关的本地下载和上传目录,然后用rz、sz命令即可方便的传输文件数据。

下载数据到本地下载目录:sz filename1 filename2 …

上传数据到远程:执行rz –be 命令,客户端会弹出上传窗口,用户自行选择(可多选)要上传的文件即可。

Linux上传文件到服务器命令是什么呢

1 ssh

$ ssh username@remotehost

用shh登陆服务器。

2、scp

命令scp基于SSH协议,可以将本地文件拷贝到远程服务上的指定目录,格式如下:

$ scp filename username@remotehost:remotedirectory

执行:$ scp ipmsg.log admin@10.25.1.202:/home/admin

3 ftp/sftp

首先用root用户登录远程Linux服务器,将admin用户添加到FTP账户中。

通过echo命令追加一行到user_list文件中:# echo admin user_list

之后通过service命令开启FTP服务:# service vsftpd start

现在就可以在本机访问FTP远程服务器了,然后通过put命令上传文件了。

4 SSH Windows Client

SSH提供了一个scp2.exe作为Windows下的scp命令工具。


新闻名称:linux上传代码命令 Linux编译代码的命令
文章位置:http://cdkjz.cn/article/docggjd.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220