Tag Archives: Linux



The following examples illustrate typical uses of the command zip for packaging a set of files into an “archive” file, also called “zip file”. The command uses the standard zip file format. The archive files can therefore be used to tranfer files and directories between commonly used operating systems.[1]

zip -r myfile.zip ./*
# archive all the files and folders in current directory
# into myfile.zip -r is short for recurse

zip -d myfile.zip smart.txt
# delete smart.txt from myfile.zip

zip -m myfile.zip ./rpm_info.txt
# add rpm_info.txt into myfile.zip

zip -r filename.zip file1 file2 file3 /usr/work/school 
# archive file1 file2 file3 and  /usr/work/school into filename.zip

Continue Reading

Linux 终端设置代理服务器


export http_proxy=""
echo $http_proxy
export http_proxy=""


# vim ~/.bashrc
export http_proxy=http://username:password@proxyserver:port/
export ftp_proxy=http://username:password@proxyserver:port/ 
source ~/.bashrc

Continue Reading

Linux 修改网络配置

Linux 修改网络配置,包括 IP GATEWAY DNS:

vi /etc/sysconfig/network-scripts/ifcfg-eth0


service network restart


/etc/rc.d/init.d/network restart

Continue Reading

Learning Mac Shell by Examples

Mac 的图形界面无可挑剔,但某些应用场合,命令行却显得轻快简洁。这里记录日常使用的 Shell 命令,持续更新,不再开新的日志。

从程序员的角度来看, Shell本身是一种用C语言编写的程序,从用户的角度来看,Shell是用户与Linux操作系统沟通的桥梁。用户既可以输入命令执行,又可以利用 Shell脚本编程,完成更加复杂的操作。在Linux GUI日益完善的今天,在系统管理等领域,Shell编程仍然起着不可忽视的作用。深入地了解和熟练地掌握Shell编程,是每一个Linux用户的必修功课之一。

Linux Shell脚本教程:30分钟玩转Shell脚本编程

Continue Reading

© 2006-2018. Powered by WordPress Romangie & Bootstrap. ICP No. 15008795