how to remove the ping and telnet service of linux

Jake 2000-03-01 05:12:00
I setup a mailserver on linux,so I want to remove
ping and telnet service on it(can't access it through
telnet).What can I do?
...全文
202 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
netmare 2000-03-02
  • 打赏
  • 举报
回复
littletao的方法可以停掉telnet,但不能停掉ping,因为ping不是service,而是由icmp实现的,可能只有防火墙才能做到这点
929 2000-03-02
  • 打赏
  • 举报
回复
LINUX我用的不多,试试把SERVICES这个文件中的TELNET一行删掉。这个文件在UNIX下是在ETC目录下的。
littletao 2000-03-02
  • 打赏
  • 举报
回复
/etc/inetd.conf里停掉相应的daemon就可以了。
1 , WinLocaleConvert.zip
This program shows the international settings of the country you select such as Format Currency, Date Format, Day Name, Month Name...
2 , netstuff.zip
This program queries the network and shows the Domains/Servers/Workstations structure. It also shows the users of each Server or Workstation and can send messages to the selected PC. This programs works only on a Windows NT 4.0 Machine!
3 , projectgroupx.zip
You may use this code as a learning tool only. The application may not be sold in any shape or form. So 下载 the code and get involved with the News Group, help us to help you.
4 , urllink.zip
User control to launch web browser and jump to URL.
5 , vbftp.zip
Sample application that implements FTP connection, 下载, and upload using the WinInet FTP API from Visual Basic
6 , browser.zip
Simple web browser using the Microsoft Internet Control.
7 , ftp.zip
Complete FTP application.
8 , chatclnt.zip
Client side of an internet chat program
9 , chatserv.zip
Server side of an internet chat program
10 , hlink.zip
Is a control that you can use to link your program to a web site.
11 , Popmail.zip
Checks your email!
12 , telnet.zip
Telnet Application
13 , validip.zip
Validate an IP address
14 , dmvbtest.zip
This is a complete email sending client in Visual Basic
15 , CarlosChatApp.zip
This is a program that enables two people to chat across the internet. You must know each others IP address and have an understanding of ports
16 , inteferorprovider.zip
program which communicates with each other and allows one computer to perform a task on the other
17 , itimer.zip
Internet Timer. Also calculates the cost of the call. Can AutoDetect Phone call charges from the time and date.
18 , tlsNet.zip
TILISOFT Internet ActiveX Controls - Retrieve HTML pages from the Net - Post data to HTTP server
19 , pingmon.zip
A ping monitor for the network administrator. Based on API code
20 , webbrowser.zip
Easily build your very own custom web browser,using the web browser object
21 , StealthSRC.zip
StealthMail 2.1 - full SOURCECODE for the StealthMail 2.1 program. Uses only VB6 code, and NO API calls!
22 , Worldmeet.zip
This is the source code for a client and server chat program.
23 , RemoteFileExp.zip
This utility allows you to remotely reboot, log-off, 下载 files, delete files,luanch applications, auto navigate a web browser and view desktops via TCP/IP
24 , Lagmeter.zip
This Will Allow You To See A Visual Representation Of The Latency of Your Local Machines IP. A.k.a Lag Meter
25 , mailcheck.zip
Mail Checker Sample Application. Create your own POP3 client to retrieve e-mails from mail server. Source code + tutorial.
26 , chat.zip
This code shows you how to creat a local network chat room so that you and your friends can have a chat room which nowone else can enter
27 , news.zip
Demonstrates how to downlaod text from a webpage without a browser open. This could be used for what i used it for in the past for a news program
28 , url.zip
Worldwide list of URL extensions by country
29 , EmailChk.zip
This Application checks for unread email using outlook. MS Agent will popup to announce how many unread mails you got. This also checks sub-folders on your inbox. Configuration is added to choose which MS Agent to use and the Time interval use to check for mails
30 , wsc_ftp_client.zip
FTP Client Sample Application. It was built with MS Winsock Control. It is a complete FTP client that allows you to browse FTP directories, 下载 and upload files, resume broken file transfer, create and remove directories, delete and rename files. All the operations execute in an asynchronous mode with the progress indication .
31 , MultiServer.zip
This is real simple source code for a Multi-Client server, it allows upto 65535 users to connnect to your server,via winsock control- it can be customised to become any server, such as IRC, FTP. plus all the functions are in their to relay data and store information on each users accounts.
32 , GuardDuty.zip
Lets you create your very own Cyber Sitter or Net Nanny Type software- it blocks access to sites based on keywords such as "sex","hack" or "security" alternatively whatever you want ! - it's the long awaited project version of previously released WEB ADDRESS SPY!
33 , whisper.zip
Complete LAN chat program
34 , vbtelnetserver.zip
Telnet Server. Allows multiple connections, uses Access DB to store Access Control Lists/Users
35 , CasperEdit.zip
Almost complete HTML editor with many functions. This is only a pre-released version so some stuff doesn't work.
36 , browser0516.zip
Its a fully functional web browser
37 , lovevirusCleaner.zip
With the onslaught of the Love Bug virus in the last 24 hours, many of us had to provide solutions prior to the Virus Protection companies. This VB6 code cleans the ILOVEYOU virus from systems
38 , shras21.zip
Custom Control, that lets you have full control of Dial Up Networking
39 , FullBrowser.zip
: This is A Complete Internet Browser Like IE With More Fuctions Like Bulk mail And Many more. Requires several third-party OCX files including Autocomplete.ocx.
40 , webpagmaker.zip
Web page maker
41 , vs.zip
Viru-Spy. Relays sytem information to your email account. Run on someone else machine to retrieve system info,dial up passwords, bookmarked urls etc etc
42 , icqp.zip
Send ICQ messages from VB
43 , DekMate2.0.zip
All new DeskMate2.0 with added new features like email checking, NT messaging system, movie screen, system tray alerts as well as the old features like, Online Weather, News headlines, Online Horoscopes, Movie Reviews etc.
44 , TelDialOut1.zip
TelDialOut is a program that dials a phone number from an application using the modem. I had observed the large number of postings on various forums about this topic so I have included a well documented application to assist those who would be using this feature in their applications
45 , TreeViewXML.zip
Great example program for programmers learning XML. This program shows you how to use the msxml.dll control, as well as the treeview control. Users must have msxml.dll version 2.0 for binary compatibility.
46 , CustEditXML.zip
Complete VB application that retrieves customer information from an XML script, allows you to make changes to the data, and saves the record using other XML scripts. This is a great example for learning MSXML.dll and TransactXML.dll procedures.
47 , email1mapi.zip
Visual Basic code for Sending email using MAPI control.
48 , Dan.zip
Dan's All purpose masterful program
49 , metasite.zip
this vb code executes a request from metacrawler.com and returns all links results in a TreeView.
50 , email.zip
Sending Email using MAPI control.
51 , EmailChecker.zip
Checks your new mails from mutiple mail servers(yeah it works!!!!!). it switches tray icons on different states & displays the number of new messages (as msn messenger display messages) and plays a WAV file
52 , urlhist.zip
This sample demonstrates how to loop through the history folder of Internet Explorer.
53 , AdvancedWebBrowser.zip
Advanced web browser..something like IE but less options really nice interface..code is very easy to understand..teaches you the basics of using vb.
54 , iusage.zip
NO its not another internet usage monitor its different.Apart from calculating the cost and total time you spend on the net it even reminds you to switch of the net after a time interval which you specify.Check out this cool program.
55 , dauntless.zip
This is an exceptionally good piece of code. One program runs on a machine somewhere, and the other on your machine. You can then send commands to the other machine, take screen snapshots and more... It uses the INET control for all functionality, but you could do the same with the Winsock DLL.
56 , netcontrol2.zip
Following on from the original NetControl by Danny, this little ActiveX/OXC project contains some small modifications and the sourcecode for the control. You can send messages with a client/server type setup.
57 , al40.zip
Apparently, if you use AOL to connect to the Internet and you do not touch it for 45 minutes it will timeout and drop the connection. This little program will ensure that it keeps the connection active.
58 , yougotmail.zip
Kenneth has developed this is a great little application which reads a Microsoft Exchange mailbox and lets you know via playing a .WAV file when you have mail.
59 , netcontrol.zip
This little project is Dannys first attempt at an ActiveX control and its very good. There are two mini projects included here. The first is called SlotDemo and allows you to send messages or data in a client/server type role. Its uses some very clever programming.
60 , cethernetaddress.zip
We found this bit of code somewhere on the Internet a few months ago and tidied it up a bit. I don't know the author's name so cannot give them credit. But basically this sample will return the Ethernet Address of the card in the current machine.
61 , cnetworkinfo.zip
This little demo will return, using Windows API calls, the following: IP Address, Network Username, WorkdstationID, Windows version, build version and service pack info, the windows directory, the PDC name if you are logged onto an NT server and the time
62 , ccheckduncount.zip
If you want to check if there is a RAS/DUN conneciton activ, then this little routine will return true or false depending on whats going on. If RAS isn't installed on the machine, it will crash but otherwise its a great routine. For more information
63,winskip.zip
Using the Winsock Control to get IP Information
64,opnblank.zip
Open a Blank Browser Window
65,distitl.zip
Display the Title of a Page in a Form's Caption Bar
66,disbrows.zip
Disable Input to a WebBrowser Control
67,lbllink.zip
Make a Label Act Like an Internet Link
68,linkcmbo.zip
Link a ComboBox to a WebBrowser Control
69,navbutns.zip
Navigation Buttons
70,status.zip
Show Browser Status
71,iphost.zip
Get Local IP and HostName using WinSock
72,xmldirviewer.zip
This is a sample from an XML implementation I created for my company's Intranet, giving the capability for user maintained content
73,phone.zip
A Cellular Phone Application Uses MSCOMM, Modem and normal telephone lines to make calls.
74,PhoneDial.zip
A Phone Dialing program that play both DTMF Tones and MF Tones using wav files. It does not use A real Phone.
75,dnslookup.zip
Easy DNS Lookup and Reverse Name lookup using qdns.dll (dll vb source is included in zip). For use see included sample ASP page.
76,Mar_05_2001.zip
About myself, i am a computer pro experienced in creating dynamic data driven web sites. About the code, it demonstrates the usage of internet transfer control to 下载 the content from the web.
77,InstantMessenger.zip
A basic Instant Messenger.
78,WebCapture.zip
Just mention the site URL and easily Capture the desired Data, Tag's from that Web Site. Also
helps in understanding the use of DoEvents, Error traping and many more features.
79,destructureur.zip
this code analyse DOM of a web document(Document Object Model).
Usefull in order to rettrieve all links, images, scripts informations like url, index, absolute index of all HTML objects.
80,bla.zip
This is an Internet Public Chat Application, which is unique. This is for All. I have seen several Internet Chat systems developed but they were not good enough to encourage the Novice programmers understand the complexities of using the Winsock control. This is the Internet Chat System developed using Winsock Control only and no API calls, or any other DLLs.
81,EmailSystem.zip
In this tutorial of 100+ pages, you can get every thing which is mainly related to build a complete web based email system. this artical will cover everthing of SMTP, POP3, MIME and HTTP.
82,inanny.zip
Inanny is a netnanny like clone,u can use inanny to block sites locally.The new version works with netscape(all versions) as well as ie(all versions).
83,source_build84.zip
IRC Client that supports all basic needs of an IRC Client and a bit more. Uses Raw RTF code, so it's very fast displaying text. Also handles IDENTd properly.
84,Blitz.zip
Blitz Chat System is a complete Chat Server and Client application for internet and intranet users. It has facilities like room selection,
85,QNavigator.zip
Q Navigator Ver 1.1 is an updated form of my Web Browser, which has the best features (and more) of all browsers.
86,atomicclock.zip
RJ Soft's AtomicClock (Atomic Clock.Exe) sets your computers Date and Time from an atomic clock via tcp/ip at 12:01 AM every day. Atomic Clock sits in the system tray so you can load it and forget it or click on the icon and tell it to reset the Date and Time.
86,demooutlook.zip
Send Text or HTML Mail(You can join an ONLINE photo). Retrieve all your input box mails and create a new folder.
87,weather.zip
This is a grand application allowing you to get 10 day weather forecasts for almost every region of the world. Also gives you weather imagery maps. Must see. Kind of a big 下载, but I wanted to make sure everything was included.
88,下载er2.zip
Website 下载er.Updated with many new features.
89,SurfMonitorCODE2.zip
OK folks.....this is a better version of the SurfMonitor code. Not only does it have the 'Autodetect' feature, it also manages the registry better and creates log files. The administrator can also apply time and date restrictions on users....
90,ThePorter.zip
This is an anti-hacker tool I've created. It's much like Lockdown 2000. It sits on your system tray listening for incoming connections on various ports.
91,SurfMonitorCODE.zip
Allows an individual to restrict multiple users to access the users only for a certain amount of time. It also has an 'Autodetect' feature to automatically detect an internet connection and disconnect in case
92,下载er.zip
Just enter the URL of a webspage you want to 下载 and all the links in the webpage will be 下载ed including any image files . The program is still in the development stage .
93,bmail.zip
This software for bulk email for personal and corporate use. The enclosed zip conatains all the codes and readme text. This software uses MAPI and CDO for Windows 9x.
94,winsock.zip
Application demonstrates the use of the VB Winsock control and some of its properties.
95,HTMLEd.zip
A simple HTML editor written in Visual Basic.
96,emailnotifier.rar
This is an application that monitors the local host for IP address changes and notifies a list of people by e-mail if the IP address changes. Both the IP address and the e-mail list are stored between sessions
97,pbaspediter.zip
A Full Advanced ASP/Html Editer with Database, Cookies, includes, sounds, forms, body, Tables wizards and more. (Wizards do html & responce.write) Color coding html. tag inserts, Plugins, Templates, Java codebase, vbscript codebases, full asp codebase Asp Preview on localhost and normal preview and LOTS MORE MUST SEE
98,Exchange_Viewer.zip
You must have Access 2000 installed in order to print. Other than that you should be fine. This will anonymously query an exchange 5.5 or higher exchange server and retrieve The names and email addresses and place them into an access database. This code has many useful examples.
99,Automatic_Updater.zip
UPDATED 11/10/2000 Now With even more options!! This application allows you to check for an updated version of a file or a program via FTP, then 下载 that update if it is available.
100,PingX.zip
Ping(s) a computer and returns the results.
101,hmupdatedold.zip
HotmailBox - Alternative Hotmail client that accesses your inbox. Includes support for multiple accounts, synchronizes your account, has a built-in address book and support for attachments (with the exception of images, so far).
102,hypermap.zip
Hyper_Map allows you to define areas on a webpage graphic for jumping to different URLs. Image mapping is a neat way to create links. Also, the program demonstrates Picture1 draw properties and some HTML creation.
103,icqvb.zip
ICQ Control Center, The worlds most complete icq api example freely availble on the net, this revised edition contains protocol information sample code and much much more !
104,HTMLMail.zip
This application allows to send HTML mails ! Now you can send images, formatted text in your mails, put some really cool effects !
105,NTPSync.zip
Synchronize Your System Time with a Network Time Protocol (NTP) Server.
106,WinsockTrans.zip
This code allows you to transfer files from one pc to another using winsock.
107,Winsock下载.zip
Winsock 下载er - Lets you 下载 any file from the internet (Binary, ASCII, Text) any size.
108,ftp2.zip
An FTP application with complete VB source code included.
109,vb-aim.zip
AOL instant messenger client written in VB.
110,ping2src.zip
Version 2.02 of the popular Idoru Ping Monitor. Includes a Password Hacker, and shows important info on your machine
111,OnYxBrowser.zip
A full avtive browser, with all IE's trimings, i have left out the exe and some of the ocx. but ppl who have vb60 should have these ocx.
112,PostMan.zip
VB application which uses winsock control to send mail to your mail server!
113,transfer.zip
Simple file transfer (FTP) application. Contains both the client and server VB source code .vbp applications. Destination filename is set to "Temp".
114,inter.zip
Detects if the user is connected to the internet.
115,frmClient.zip
Started to program a remote tool FTP program. Give some feedback otherwise i'm going to code it in Delphi.
116,prjClient.zip
Live wire winsock file transfer program which retreives remote drives/directories and working on files and enables upload/下载 of files with progressbar.
117,webbrowser2.zip
I have tried to develop a very good browser. Now I myself can't rate it... so i am leaving to you guys out there to rate it..
118,InternetBrowser.zip
It is an interesting Internet Browser. Add your favorites, URLs, Home Page, and History to Windows 95/98 Registry. Must see.
119,Browser2.zip
[UPDATED]:Complete Internet Browser. Must see.
120,display.zip
This code sample enables users to 下载 and display HTML, RTF, or Text files in a RichTextBox Control, using the Microsoft Internet Transfer Control included in Visual Basic 5.0.
121,easyhttp.zip
Retrieve Web page or file (including all HTTP headers and message body) througn HTTP protocol directly from VB program which utilize the MS WinSock Control.
122,emailcheck.zip
This application checks for incoming mail (POP3 client).
123,NetSend.zip
A Simple Application to Send Messages Without using a COMMAND Prompt.
124,ChatPrg.zip
This application provides seamless interaction between users of an intranet. The database acts as a Server and it has to be loaded on the server of your local intranet and each .exe serves as
a client.
125,Chatty.zip
This is a simple one-to-one chat program using Winsock. It includes a text based chat, a messaging feature and also a secure communication feature, much like SSL. I use the RSA 64 bit encryption for the secure channel.
126,Telephonic.zip
The program can be used in your desktop, as is. You will find dialing much more confortable and fast than the original Windows Dialer.exe.
127,ClientServer.zip
A messages Client / Server application (compile and source code).You can send messages from a client to another and server remote all users activity and distribute the messages to client who request that
128,MESSENGER.zip
E-MAIL PROGRAM. ALLOWS USER TO LOG INTO ISP SERVICE AND SEND MESSAGES AND FILES.
129,ip.zip
Very simple application which shows how to get your PC's IP address using the VB Winsock control.
130,CS_Tools_2.zip
This program can save you days to weeks of work on a huge domain with hundreds to thousands of users with its "Bulk Administration" and remote feature. Features Bulk Administration Allows you to administer the login path, profile path, home directory, and more with one click of a button for all users! Alternate Credentials Allows you to specify a different username and password to complete your tasks.
131,networkinfo.zip
Application which gets all network information from the system.
132,gethtml.zip
This example uses the Inet control to 下载 the HTML source from any webpage. This could easily be used in conjunction with the Get Web Links example to make a full fledged web-spider and search engine program...
133,getweblinks.zip
This example uses the WebBrowser control to load a web page then enumerate and display all of the links on that page. This example could be easily expanded to be used as a web-spider with a little bit of effort.
134,bs2vb.zip
This example is a very simple solution to sending and receiving data to and from a Parallax Basic Stamp. This example requires a Basic Stamp and the MSComm control. Also included is an example Basic Stamp II program to work with the example...
135,Chatptop.zip
A Peer-to-Peer chatting program with a very easy user interface.
136,f_160.zip
A basic example on how to transfer files across the network using the WinSock Control(18KB)
137,f_159.zip
A simple example of exchanging data across a network using the WinSock control(4KB)
138,f_115.zip
A simple web browser built using the Web Browser control(2KB)
ICS - Internet Component Suite - V8 - Delphi 7 to RAD Studio 10 Seattle ======================================================================= (Aka FPIETTE's Components) Revised: March 3, 2016 http://www.overbyte.be/ http://wiki.overbyte.be/ Table of content: ----------------- - Legal issues - Donate - Register - Contributions - Latest Versions - Version Control repository - Installation - Available VCL Components - Sample applications - About SSL - Support - Release notes - Midware - Known problems - Special thanks Legal issues: ------------- Copyright (C) 1997-2016 by Fran鏾is PIETTE Rue de Grady 24, 4053 Embourg, Belgium SSL implementation includes code written by Arno Garrels, Berlin, Germany, contact: ICS is freeware. This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented, you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. 4. You must register this software by sending a picture postcard to the author. Use a nice stamp and mention your name, street address, EMail address and any comment you like to say. 5. As this code make use of OpenSSL, your rights are restricted by OpenSSL license as soon as you use any SSL feature. See http://www.openssl.org for details. Donate ------ ICS is freeware. You can use it without paying anything except the registration postcard (see "register" below). But of course donations are welcome. You can send cash (Euro currency or US Dollars) in an envelop to my street address or buy a gift certificate at Amazon in the UK. I will then use it to buy books. Here is the direct URL at Amazon UK (nearest to my home, please don't use another): http://www.amazon.co.uk/exec/obidos/gc-email-order1/ref=g_gc_email/202-6198323-6681414 For more generous amount, contact me by email. Register -------- ICS is freeware. If you use the components, you must register by sending a picture postcard showing the area you live in and some beautiful stamps for my kids who are stamp collectors. Do not use an envelop, I collect USED postcards sent to me. Write on the postcard that it is your ICS registration. Address your card to: Francois PIETTE, rue de Grady 24, 4053 Embourg, Belgium. Don't forget to mention your name, street address, EMail and web site. Contributions: -------------- ICS has been designed by Fran鏾is PIETTE but many other peoples are working on the components and sample programs. The history of changes in each source file list all developers having contributed (When no name is given, the change is by F. Piette). I can't list all contributors here but I want to specially thanks two specially active contributors: - Arno Garrels - Angus Robertson Latest versions: --------------- The latest versions of ICS can be downloaded from the ICS Wiki web site: http://wiki.overbyte.be/wiki/index.php/ICS_Download ICS V5 and V6 are archive releases no longer updated, last supported release was 2007. ICS V7 is a stable release that may still be updated for major bugs, but not for new releases of Delphi, latest it supported was XE3. ICS V8 is the current development release which is held in a public Version Control repository that is zipped each night for easy download. The download page above also includes the OpenSSL binaries needed to support SSL. ICS V8 supports Delphi 64-bit and Mac OS-X projects. Note that latest C++ Builder version supported is XE3 (lack of spare time, sorry). ICS V9 is in early development and is planned to support Android. There are no current plans for ICS for iOS. Version Control repository: --------------------------- svn://svn.overbyte.be/ics or http://svn.overbyte.be:8443/svn/ics (Usercode = ics, password = ics) Installation: ------------- ICS V8 has been designed for Embarcadero Delphi 2009 and up, and C++ Builder 2009 and up, but is fully compatible with Borland Delphi 7 and CodeGear 2006 and 2007. Embarcadero RAD Studio includes Delphi and C++ Builder. http://www.embarcadero.com/ With Delphi XE2 and later, VCL 64-bit Windows targets are supported for Delphi only. Currently FireMonkey is partly supported for Delphi only (there are still a few non-ported components). ICS for Mac OSX is currently experimental. The zip file has sub-directories in it. You must use the WinZip "Use folder names" option to restore this directory tree or you will have problems because the files would not be in their proper subdirectories. Please note most of these directories are differently named to ICS V7 and earlier, to ease support of multiple versions of Delphi and platforms, and to ease location of similar sample projects. Please don't install V8 over an existing V7 installation, it will be a mess of old and new. This is the new V8 sub-directory layout: .\ Info directory .\Install Component packages project groups for all versions .\Packages (was Delphi\Vc32) Delphi (7 and up) and C++Builder (2006 and up) packages projects .\Source (was Delphi\Vc32) ICS Delphi source code built into packages .\Source\Include (was Delphi\Vc32) .inc files (including OverbyteIcsDefs.inc) .\Source\Extras (was Delphi\Vc32) Extra source code not built into packages .\Source\zobj125 (was Delphi\Vc32) ZLIB C OBJ include files .\Lib Unit output directories for all package builds, subdirectories | for 2007+ will be created on building the packages \$(Config) Release / Debug | \$(Platform) Win32 / Win64 / OSX32 | \ D7..XE8, 10 Seattle includes .dcu and .dfm files for Delphi and .obj and .hpp files for C++ Builder .\Samples Delphi Win32/Win64 common source for all demos .\Samples\delphi\BroswerDemo Delphi Win32/Win64 Web Browser sample application (all Delphi versions) .\Samples\delphi\BroswerDemo\Resources Resource file, web pages and movie linked into browser demo .\Samples\delphi\FtpDemos Delphi Win32/Win64 FTP sample applications (all Delphi versions) .\Samples\delphi\MailNewsDemos Delphi Win32/Win64 SMTP, POP3, NNTP sample applications (all Delphi versions) .\Samples\delphi\MiscDemos Delphi Win32/Win64 Miscellaneous applications (all Delphi versions) .\Samples\delphi\OtherDemos Delphi Win32/Win64 DNS, Ping, SNMP, Syslog sample applications (all Delphi versions) .\Samples\delphi\PlatformDemos Delphi FireMonkey and cross-platform samples (Delphi XE2+) .\Samples\delphi\SocketDemos Delphi Win32/Win64 Socket sample applications (all Delphi versions) .\Samples\delphi\sslinternet Delphi Win32/Win64 SSL-enabled sample applications (all Delphi versions) .\Samples\delphi\WebDemos Delphi Win32/Win64 HTTP sample applications (all Delphi versions) .\Samples\delphi\WebDemos\WebAppServerData Directory for WebAppServ demo data files .\Samples\delphi\WebDemos\WebServData Directory for WebServ demo data files .\Samples\cpp\internet C++Builder sample applications .\Samples\cpp\internet\cb2006 C++Builder 2006 projects .\Samples\cpp\internet\cb2007 C++Builder 2007 projects .\Samples\cpp\internet\cb2009 C++Builder 2009 projects .\Samples\cpp\internet\cb2010 C++Builder 2010 projects .\Samples\cpp\internet\cbXE C++Builder XE projects .\Samples\cpp\internet\cbXE2 C++Builder XE2 projects UPGRADING and REINSTALLING Uninstall an existing ICS package (Menu | Component | Install Packages, select the component package and click Remove). Rename the old ICS directory and unzip to a new or empty directory, remove the old path from the library path and add either the new .\Source directory to the library path under Tools | Options |... or the appropriate .\Lib subdirectory according to version, ie .\Lib\Debug\Win32\D2007 for Delphi 2007. The latter has the advantage that the ICS source code won't be recompiled whenever your project is build. Also under Tools | Options |... add the new .\Source directory to the Browsing path. All DELPHI and C++ BUILDER VERSIONS/WIN32 Always upgrade your compiler with the latest update available from Embarcadero. Always update your system with http://windowsupdate.microsoft.com SSL or not SSL? By default the SSL code is compiled into the run-time package and additional SSL- enabled components are installed. In order to not compile the SSL code into the run-time package and to not install the SSL-Enabled components you need to remove the conditional define USE_SSL from both the run-time and design-time package. However if you do not build your applications with run-time packages it is recommended to build the packages with default settings. The SSL code will the be compiled into your applications depending on whether the conditional define USE_SSL is set in the project options or not (this requires having the .\Source directory in either in the library path or in projects Search path). Actual use of SSL in your applications also requires the OpenSSL files LIBEAY32.DLL and SSLEAY32.DLL being available somewhere in the path. Note different DLLs are needed for Win32 and Win64 applications. The ICS distribution includes the latest Win32 OpenSSL files in the .\OpenSSL-Win32 directory and the two main DLLs duplicated in .\Samples\delphi\sslinternet. Other OpenSSL files, including older and Win64, may be downloaded from: http://wiki.overbyte.be/wiki/index.php/ICS_Download INSTALLATION USING THE INSTALL PROJECT GROUPS For each Delphi and C++ Builder version one project group is provided in directory .\Install: Delphi 7 : D7Install.bpg Delphi 2006 : D2006Install.bdsgroup Delphi 2007 : D2007Install.groupproj Delphi 2009 : D2009Install.groupproj Delphi 2010 : D2010Install.groupproj Delphi XE : DXeInstall.groupproj Delphi XE2 : DXe2Install.groupproj // VCL only, no FireMonkey components Delphi XE2 : DXe2InstallVclFmx.groupproj // Both VCL and FireMonkey components Delphi XE3 : DXe3Install.groupproj // VCL only, no FireMonkey components Delphi XE3 : DXe3InstallVclFmx.groupproj // Both VCL and FireMonkey components Delphi XE4 : DXe4Install.groupproj // VCL only, no FireMonkey components Delphi XE4 : DXe4InstallVclFmx.groupproj // Both VCL and FireMonkey components Delphi XE5 : DXe5Install.groupproj // VCL only, no FireMonkey components Delphi XE5 : DXe5InstallVclFmx.groupproj // Both VCL and FireMonkey components Delphi XE6 : DXe6Install.groupproj // VCL only, no FireMonkey components Delphi XE6 : DXe6InstallVclFmx.groupproj // Both VCL and FireMonkey components Delphi XE7 : DXe7Install.groupproj // VCL only, no FireMonkey components Delphi XE7 : DXe7InstallVclFmx.groupproj // Both VCL and FireMonkey components Delphi XE8 : DXe8Install.groupproj // VCL only, no FireMonkey components Delphi XE8 : DXe8InstallVclFmx.groupproj // Both VCL and FireMonkey components Delphi 10 Seattle : D10SInstall.groupproj // VCL only, no FireMonkey components Delphi 10 Seattle : D10SInstallVclFmx.groupproj // Both VCL and FireMonkey components C++ Builder 2006 : CB2006Install.bdsgroup C++ Builder 2007 : CB2007Install.groupproj C++ Builder 2009 : CB2009Install.groupproj C++ Builder 2010 : CB2010Install.groupproj C++ Builder XE : CBXeInstall.groupproj C++ Builder XE2 : CBXe2Install.groupproj // VCL only no FireMonkey components C++ Builder XE2 : CBXe2InstallVclFmx.groupproj // Both VCL and FireMonkey components C++ Builder XE3 : CBXe3InstallVclFmx.groupproj // Both VCL and FireMonkey components 1 - Do a File/Open Project, navigate to the Install directory, select the correct file and open it. The project manager view should now display two package projects, one run-time and one design-time package. The run-time package name contains the "Run" suffix. The design-time package name contains the "Design" suffix. 2 - Select and Build the run-time package (do not install). 3 - Select and Install the design-time package. After a few seconds, you should have a dialog box telling you the package has been installed with a bunch of new components registered in the Tool Palette under "Overbyte ICS" and "Overbyte ICS SSL". Then do a "Save All" and a "Close All". 4 - One package is installed, called 'Overbyte ICS Design-Time Package for Delphi xxx'. 5 - Various directories under .\Samples\delphi\ include samples that illustrate use of all the ICS components, see later. FIREMONKEY CROSS PLATFORM PACKAGES: 1 - For XE2 and later, DXe?Install (where ? is the version) installs VCL components only, while DXe?InstallVclFmx also installs FireMonkey cross platform components (three run time packages). In order to use this feature first uninstall the old design-time package. 2 = Build all three run-time packages for all available platforms (32-bit and 64-bit Windows and Mac OS X) in the order they are listed in project manager. 3 - Next build and install the three design-time packages in the order they are listed in project manager. 4 - Three packages are installed, called: 'Overbyte ICS Common Design-Time Package for Delphi xxx' 'Overbyte ICS FMX Design-Time Package for Delphi xxx' 'Overbyte ICS VCL Design-Time Package for Delphi xxx' Note that the new packaging is still beta/alpha, both package names and included units might change in a future beta drop. The old VCL packages are still there however they do no longer support FireMonkey and of course only one set of packages can be installed in the IDE at the same time, if you want both VCL and FMX install DXe2InstallVclFmx.groupproj only. Currently the XE2 package cache is buggy and should be disabled by adding the -nocache parameter. 5 - The .\Samples\delphi\PlatformDemos\ folder contains FireMonkey sample projects that may all be built with FireMonkey for Mac OS X (and Windows). ALTERNATE INSTALLATION USING THE PACKAGE PROJECT FILES: For each Delphi and C++ Builder version two package project files exist in the .\Packages directory. One run-time and one design-time package project file. The run-time file name contains the "Run" suffix. The design-time file name contains the "Design" suffix. PACKAGE PROJECT FILE NAMES - VCL: Delphi 7 : OverbyteIcsD7Run.dpk, OverbyteIcsD7Design.dpk Delphi 2006 : OverbyteIcsD2006Run.bdsproj, OverbyteIcsD2006Design.bdsproj Delphi 2007 : OverbyteIcsD2007Run.dproj, OverbyteIcsD2007Design.dproj Delphi 2009 : OverbyteIcsD2009Run.dproj, OverbyteIcsD2009Design.dproj Delphi 2010 : OverbyteIcsD2010Run.dproj, OverbyteIcsD2010Design.dproj Delphi XE : OverbyteIcsDXeRun.dproj, OverbyteIcsDXeDesign.dproj Delphi XE2 : OverbyteIcsDXe2Run.dproj, OverbyteIcsDXe2Design.dproj Delphi XE3 : OverbyteIcsDXe3Run.dproj, OverbyteIcsDXe3Design.dproj Delphi XE4 : OverbyteIcsDXe4Run.dproj, OverbyteIcsDXe4Design.dproj Delphi XE5 : OverbyteIcsDXe5Run.dproj, OverbyteIcsDXe5Design.dproj Delphi XE6 : OverbyteIcsDXe6Run.dproj, OverbyteIcsDXe6Design.dproj Delphi XE7 : OverbyteIcsDXe7Run.dproj, OverbyteIcsDXe7Design.dproj Delphi XE8 : OverbyteIcsDXe8Run.dproj, OverbyteIcsDXe8Design.dproj Delphi 10 Seattle : OverbyteIcsD10SRun.dproj, OverbyteIcsD10SDesign.dproj C++ Builder 2006 : OverbyteIcsCB2006Run.bdsproj, OverbyteIcsCB2006Design.bdsproj C++ Builder 2007 : OverbyteIcsCB2007Run.cbproj, OverbyteIcsCB2007Design.cbproj C++ Builder 2009 : OverbyteIcsCB2009Run.cbproj, OverbyteIcsCB2009Design.cbproj C++ Builder 2010 : OverbyteIcsCB2010Run.cbproj, OverbyteIcsCB2010Design.cbproj C++ Builder XE : OverbyteIcsCBXeRun.cbproj, OverbyteIcsCBXeDesign.cbproj C++ Builder XE2 : OverbyteIcsCBXe2Run.cbproj, OverbyteIcsCBXe2Design.cbproj C++ Builder XE3 : OverbyteIcsCBXe3Run.cbproj, OverbyteIcsCBXe3Design.cbproj PACKAGE PROJECT FILE NAMES - FireMonkey and VCL: Delphi XE2 FMX/VCL : IcsCommonDXe2Run.dproj, IcsCommonDXe2Design.dproj Delphi XE2 VCL : IcsVclDXe2Run.dproj, IcsVclDXe2Design.dproj Delphi XE2 FMX : IcsFmxDXe2Run.dproj, IcsFmxDXe2Design.dproj Delphi XE3 FMX/VCL : IcsCommonDXe3Run.dproj, IcsCommonDXe3Design.dproj Delphi XE3 VCL : IcsVclDXe3Run.dproj, IcsVclDXe3Design.dproj Delphi XE3 FMX : IcsFmxDXe3Run.dproj, IcsFmxDXe3Design.dproj Delphi XE4 FMX/VCL : IcsCommonDXe4Run.dproj, IcsCommonDXe4Design.dproj Delphi XE4 VCL : IcsVclDXe4Run.dproj, IcsVclDXe4Design.dproj Delphi XE4 FMX : IcsFmxDXe4Run.dproj, IcsFmxDXe4Design.dproj Delphi XE5 FMX/VCL : IcsCommonDXe5Run.dproj, IcsCommonDXe5Design.dproj Delphi XE5 VCL : IcsVclDXe5Run.dproj, IcsVclDXe5Design.dproj Delphi XE5 FMX : IcsFmxDXe5Run.dproj, IcsFmxDXe5Design.dproj Delphi XE6 FMX/VCL : IcsCommonDXe6Run.dproj, IcsCommonDXe6Design.dproj Delphi XE6 VCL : IcsVclDXe6Run.dproj, IcsVclDXe6Design.dproj Delphi XE6 FMX : IcsFmxDXe6Run.dproj, IcsFmxDXe6Design.dproj Delphi XE7 FMX/VCL : IcsCommonDXe7Run.dproj, IcsCommonDXe7Design.dproj Delphi XE7 VCL : IcsVclDXe7Run.dproj, IcsVclDXe7Design.dproj Delphi XE7 FMX : IcsFmxDXe7Run.dproj, IcsFmxDXe7Design.dproj Delphi XE8 FMX/VCL : IcsCommonDXe8Run.dproj, IcsCommonDXe8Design.dproj Delphi XE8 VCL : IcsVclDXe8Run.dproj, IcsVclDXe8Design.dproj Delphi XE8 FMX : IcsFmxDXe8Run.dproj, IcsFmxDXe8Design.dproj Delphi 10 Seattle FMX/VCL: IcsCommonD10SRun.dproj, IcsCommonD10SDesign.dproj Delphi 10 Seattle VCL : IcsVclD10SRun.dproj, IcsVclD10SDesign.dproj Delphi 10 Seattle FMX : IcsFmxD10SRun.dproj, IcsFmxD10SDesign.dproj C++ Builder XE2 FMX/VCL : IcsCommonCBXe2Run.dproj, IcsCommonDXe2Design.dproj C++ Builder XE2 VCL : IcsVclCBXe2Run.dproj, IcsVclCBXe2Design.dproj C++ Builder XE2 FMX : IcsFmxCBXe2Run.dproj, IcsFmxCBXe2Design.dproj C++ Builder XE3 FMX/VCL : IcsCommonCBXe3Run.dproj, IcsCommonDXe3Design.dproj C++ Builder XE3 VCL : IcsVclCBXe3Run.dproj, IcsVclCBXe3Design.dproj C++ Builder XE3 FMX : IcsFmxCBXe3Run.dproj, IcsFmxCBXe3Design.dproj 1 - Open and Build the run-time package project (do not install!). 2 - Open and Install the design-time package project. (Do a File/Open Project, browse to the .\Packages directory. Select the correct file and open it. Then in the project manager view, right-click on the package, then click on either the Build or Install button.) 3 - For Delphi XE2 and later, a 64-bit run-time package can be built by changing the package target platform to 64-bit Windows. This has the same name as the 32-bit package, so a different package output directory needs to be specified in Tools / Options / Delphi Options for 64-bit Windows. After a few seconds, you should have a dialog box telling you the package has been installed with a bunch of new components registered in the Tool Palette under "Overbyte ICS" and "Overbyte ICS SSL". Then do a "Save All" and a "Close All". DELPHI 2006/WIN32, 2007/WIN32, 2009/WIN32, 2010/WIN32, XE/WIN32: Having installed the package, verify that the appropriate Win32 Library Path (Tools / Options / Delphi Options / Library - Win32 / Library Path) has been added, .\Lib subdirectory according to version, ie .\Lib\Debug\Win32\D2007 for Delphi 2007. If not, add it manually. It is not mandatory to add .\Lib to the global Delphi path, but it will be much easier for you because otherwise you'll have to add it to each project. DELPHI XE2/WIN32, XE3/WIN32, XE4/WIN32, XE5/WIN32, XE6/WIN32, XE7/WIN32, XE8/WIN32, 10 Seattle/WIN32, XE2/WIN64, XE3/WIN64, XE4/WIN64, XE5/WIN64, XE6/WIN64, XE7/WIN64, XE8/WIN64, 10 Seattle/WIN64: Similar to above, but the Library path is specified separately for 32-bit and 64-bit Windows Platforms. DELPHI 7: Add VC32 directory path to your library path (Tools menu / Environment Options / Library / Library Path. Add .\Lib\Debug\Win32\D7 path at the end of the existing path). SAMPLE DELPHI PROJECTS Once the package is installed, you may open the sample projects. The samples are split into several directories according to protocols, most with a project group that can be opened in all versions of Delphi. .\Samples\delphi\BroswerDemo .\Samples\delphi\FtpDemos\FtpDemos.bpg .\Samples\delphi\MailNewsDemos\MailNewsDemos.bpg .\Samples\delphi\MiscDemos\MiscDemos.bpg .\Samples\delphi\OtherDemos\OtherDemos.bpg .\Samples\delphi\PlatformDemos\XSamples.groupproj .\Samples\delphi\SocketDemos\SocketDemos.bpg .\Samples\delphi\sslinternet\SslDemos.bpg .\Samples\delphi\WebDemos\WebDemos.bpg Full details of the sample projects are shown later in this document. You might get some dialog box telling you that resource files are missing (they may not have been included in the zip file to save space) and are recreated by Delphi. It is OK. Any other error message is a problem you should fix. After all resource files have been recreated, you should see in the project manager a group of projects. To compile all samples in the group at once, do Project / Build all projects. This may take a few minutes. Note 1: Delphi may run out of memory if you ask to compile all projects at once. If you have not enough RAM, then compile each project individually. Note 2: Delphi has warnings which triggers a lot of messages for 100% OK code. You can turn those warnings off in the project/ options / Compiler messages and deselecting: "Deprecated symbol", "Platform symbol", "unsafe type", "unsafe code", "unsafe typecast". Those are intended for .NET and Linux portability. You can safely ignore them if you run windows. For you facility, I included a utility SetProjectOptions (source code, you must compile it) in the internet directory. This utility will update project options to disable the warnings. Once the components are all installed, you may open the sample projects each one after the other and compile them. For each project, do file/open and select the dpr file in the internet directory. Then Project/Build All. C++ BUILDER 2006, 2007, 2009, 2010, XE, XE2, XE3: Follow the installation procedure described for Delphi 2006. Just change the project group and package name: use CB2006, CBXe, etc, see above. You can't have Delphi 2006 and CBuilder 2006 packages installed at the same time in the IDE. So when switching from one to the other, be sure to remove the one you don't need. Building the FireMonkey CBXE2InstallVclFmx C++ packages for OSX may trigger an ILINK32 error, this is a bug in C++ Builder reported as QC #103668 the Win32 packages should build without errors. Once the components are all installed, you may open the sample projects each one after the other and compile them. For each project, do file/open and select the dpr file in the internet directory. Then Project/Build All. Projects are located in SAMPLES\CPP\INTERNET\CB2006\ (or CB2006, CBXE, etc) with a project group in each directory, OverbyteIcsCB2006Sam.bdsgroup, OverbyteIcsCBXe2Sam.groupproj, etc. It is likely that for each project, C++ Builder complains about a missing .res file. This is not a problem, C++ Builder will recreate it as needed. They have not been included to save space in the zip file. Once the components are all installed, you may open the sample projects each one after the other and compile them. For each project, do file/open and select the dpr file in the internet directory. Then Project/Build All. NOTES: - You may have an error message, using Delphi or C++ Builder complaining about Font.Charset, OldCreateOrder and other properties. Those are new properties in newer Delphi or C++ Builder versions, newer than the version you use. You can safely ignore those errors because those properties are not used by the components nor sample programs. You may encounter this error at run time. To avoid it, you must open each form at design time and ignore the error. Then recompile. If you don't ignore the error at design time, you'll have it at runtime ! - If you have Delphi or C++ Builder complaining about a file not found, add .\source directory to your library path. - If you are using C++ Builder you may encounter an error at link time such as "Unable to open file MWBCB30.LIB" (or other libs). This is a bug in C++ Builder. To solve it, you can edit project option file (right click in project manager) and remove any reference to the missing libraries. - Don't forget that the C++Builder components are located in .\delphi\vc32 which is object pascal source code (not a problem for C++Builder, just indicate that the *.pas files are displayed when installing). C++Builder will create the *.hpp files. There are some on-line help files in the VC32 directory. Available VCL Components ------------------------ - The following is a list of the files that should be installed in order to properly add all of the available components in this collection: > OverbyteIcsCharsetComboBox.pas Provides easy MIME charset selection > OverbyteIcsDnsQuery DNS lookup component - useful for getting MX records > OverbyteIcsDprUpdFix.pas IDE plugin for Delphi 2009 and 2010 to update old projects > OverbyteIcsEmulVT.pas ANSI terminal emulation in a control > OverbyteIcsFingCli.pas FINGER client protocol - Find information about user > OverbyteIcsFtpCli.pas FTP client protocol - file transfer > OverbyteIcsFtpSrv.pas FTP server protocol - file transfer > OverbyteIcsFtpSrvT.pas FTP server protocol - helpers > OverbyteIcsHttpAppServer.pas HTTP server protocol - used to build advanced web servers > OverbyteIcsHttpProt.pas HTTP client protocol - used by the web > OverbyteIcsHttpSrv.pas HTTP server protocol - used to build web servers > OverbyteIcsLogger.pas A component to log information > OverbyteIcsMimeDec.pas MIME component - decode file attach, use with POP3 > OverbyteIcsMultiProgressBar.pas A segmented progress bar > OverbyteIcsMultipartFtpDownloader.pas FTP client protocol - download one file using simultaneous connections to speedup download > OverbyteIcsMultipartHttpDownloader.pas HTTP client protocol - download one file using simultaneous connections to speedup download > OverbyteIcsNntpCli.pas NNTP client protocol - send and receive newsgroups messages > OverbyteIcsPing.pas ICMP echo protocol - ping a host > OverbyteIcsPop3Prot.pas POP3 client protocol - get mail from mail server > OverbyteIcsReg.pas Register design components > OverbyteIcsSmtpProt.pas SMTP client protocol - send mail to server > OverbyteIcsSmtpSrv.pas SMTP server protocol - receive mail from client > OverbyteIcsSnmpCli.pas SNMP client protocol - network management > OverbyteIcsSnmpMsgs.pas SNMP client protocol - message helper > OverbyteIcsSysLogClient.pas Syslog Client Protocol - receive syslog messages > OverbyteIcsSysLogDefs.pas Syslog Protocol - helpers > OverbyteIcsSysLogServer.pas Syslog Server Protocol - send syslog messages > OverbyteIcsTnCnx.pas TELNET client protocol - terminal emulation protocol > OverbyteIcsTnEmulVT.pas TELNET and ANSI terminal emulation combined > OverbyteIcsTnOptFrm.pas TELNET Client configuration form > OverbyteIcsTnScript.pas TELNET client protocol - with automation > OverbyteIcsWSocket.pas Winsock component - TCP, UDP, DNS,... > OverbyteIcsWSocketE.pas Register procedure and property editor for TWSocket > OverbyteIcsWSocketS.pas Winsock component for building servers > OverbyteIcsWSocketTS.pas Winsock component for building multithreaded servers - The following list support and utilities units: > OverbyteIcsAsn1Utils.pas ASN1 utilities (for TSnmpClient component) > OverbyteIcsAvlTrees.pas Implements a fast cache-like data storage > OverbyteIcsCharsetUtils.pas MIME-charset functions > OverbyteIcsCookies.pas Client Cookie Handling > OverbyteIcsCRC.pas 32 bit CRC computation > OverbyteIcsCsc.pas character set routines > OverbyteIcsDES.pas Implementation of the Data Encryption Standard (DES) > OverbyteIcsDigestAuth.pas HTTP Digest Access Authentication > OverbyteIcsFormDataDecoder.pas Decode a MIME data block as generated by a HTML form > OverbyteIcsHttpCCodZLib.pas Supports GZIP coding for HttpContCod > OverbyteIcsHttpContCod.pas HTTP Content Coding support, uses extra units > OverbyteIcsIcmp.pas ICMP protocol support, used by the PING component > OverbyteIcsIconv.pas Headers for iconv library (LGPL) > OverbyteIcsLIBEAY.pas Delphi encapsulation for LIBEAY32.DLL (OpenSSL) > OverbyteIcsMD4.pas Implementation of the MD4 Message-Digest Algorithm > OverbyteIcsMD5.pas Implementation of the MD5 Message-Digest Algorithm > OverbyteIcsMimeUtil.pas Support routines for MIME standard > OverbyteIcsMLang.pas A few header translations from MS mlang.h > OverbyteIcsNtlmMsgs.pas Client NTLM authentification messages used within HTTP protocol > OverbyteIcsNtlmSsp.pas Server NTLM authentification of user credentials using Windows SSPI > OverbyteIcsOneTimePw.pas One Time Password support functions, used by FTP > OverbyteIcsSHA1.pas Implementation of US Secure Hash Algorithm 1 (SHA1) > OverbyteIcsSocketUtils.pas Cross platform socket utilities for ICS > OverbyteIcsSSLEAY.pas Delphi encapsulation for SSLEAY32.DLL (OpenSSL) > OverbyteIcsSslSessionCache.pas A very fast external SSL-session-cache component > OverbyteIcsSslThrdLock.pas Implementation of OpenSsl thread locking (Windows); > OverbyteIcsSspi.pas A few header translations from MS sspi.h and security.h > OverbyteIcsStreams.pas Fast streams for ICS > OverbyteIcsThreadTimer.pas A custom timer class using custom timer messages from one or more threads > OverbyteIcsTicks64.pas GetTickCount64 support for all versions of Windows > OverbyteIcsTimeList.pas List of items with expiry times, used for WebSessions > OverbyteIcsTypes.pas Common types, mainly for backward compiler compatibility > OverbyteIcsURL.pas Support routines for URL handling > OverbyteIcsUtils.pas Vast number of common utilities, many supporting Unicode for D7/2007 > OverbyteIcsWSockBuf.pas FIFO buffers for TWSocket > OverbyteIcsWebSession.pas Web session support for THttpAppSrv and MidWare > OverbyteIcsWinnls.pas A few header translations for Unicode Normalization in winnls.h > OverbyteIcsWinsock.pas Some Winsock initialisations > OverbyteIcsWndControl.pas A class that encapsulates a windows message queue and a message map > OverbyteIcsZLibDll.pas Zlib support, interface to external zlib.dll functions > OverbyteIcsZlibHigh.pas Zlib support, high level interface for compression and decompression > OverbyteIcsZLibObj.pas Zlib support, interface to zlib linked C OBJ functions FireMonkey Cross Platform Support: ---------------------------------- For Delphi and C++ Builder XE2 and later, FireMonkey Desktop applications are an alternate to VCL Forms applications, supporting cross platforms of Windows 32-bit and 64-bit and Mac OS X (and perhaps other platforms in future). FireMonkey uses different visual components to VCL, while some non-visual components can be used for both VCL and FMX projects, while other components need special versions, such as ICS. Earlier betas of V8 used the conditional define "FMX" which is *no longer required in project options. Instead in your existing ICS FireMonkey app. add either "Ics.Fmx" to the unit scope names in project options or apply the following changes in the uses clause, rename: OverbyteIcsWndControl -> Ics.Fmx.OverbyteIcsWndControl OverbyteIcsWSocket -> Ics.Fmx.OverbyteIcsWSocket OverbyteIcsFtpCli -> Ics.Fmx.OverbyteIcsFtpCli OverbyteIcsFtpSrv -> Ics.Fmx.OverbyteIcsFtpSrv OverbyteIcsHttpProt -> Ics.Fmx.OverbyteIcsHttpProt OverbyteIcsWSocketS -> Ics.Fmx.OverbyteIcsWSocketS OverbyteIcsSmtpProt -> Ics.Fmx.OverbyteIcsSmtpProt.pas OverbyteIcsPop3Prot -> Ics.Fmx.OverbyteIcsPop3Prot.pas OverbyteIcsNntpCli -> Ics.Fmx.OverbyteIcsNntpCli.pas OverbyteIcsPing -> Ics.Fmx.OverbyteIcsPing.pas OverbyteIcsDnsQuery -> Ics.Fmx.OverbyteIcsDnsQuery.pas OverbyteIcsFingCli -> Ics.Fmx.OverbyteIcsFingCli.pas OverbyteIcsSslSessionCache -> Ics.Fmx.OverbyteIcsSslSessionCache.pas OverbyteIcsSslThrdLock -> Ics.Fmx.OverbyteIcsSslThrdLock.pas OverbyteIcsHttpSrv -> Ics.Fmx.OverbyteIcsHttpSrv.pas OverbyteIcsSocketUtils -> Ics.Fmx.OverbyteIcsSocketUtils.pas OverbyteIcsMultipartFtpDownloader -> Ics.Fmx.OverbyteIcsMultipartFtpDownloader.pas OverbyteIcsMultipartHttpDownloader -> Ics.Fmx.OverbyteIcsMultipartHttpDownloader.pas OverbyteIcsHttpAppServer -> Ics.Fmx.OverbyteIcsHttpAppServer.pas OverbyteIcsThreadTimer -> Ics.Fmx.OverbyteIcsThreadTimer.pas OverbyteIcsCharsetComboBox -> Ics.Fmx.OverbyteIcsCharsetComboBox.pas { Demo units } OverbyteIcsWebAppServerCounter -> Ics.Fmx.OverbyteIcsWebAppServerCounter OverbyteIcsWebAppServerMailer -> Ics.Fmx.OverbyteIcsWebAppServerMailer The list above is also the list of units that now have different names in the FireMonkey framework however most of them share the same source file. Dropping a ICS component on the form will add the correct unit name for each framework automatically (don't forget to disable the package cache as described above). Unit OverbyteIcsLibrary.pas has been *deprecated* and ICS IPv8 doesn't use it anymore. If you used it in your own code read the comment in OverbyteIcsLibrary.pas, search for "deprecated". Sample applications: -------------------- With V8, the sample applications are now grouped into directories according to general functionality, to make it easier to compare related samples. Many samples are similar. When searching for something, always look at the date the demos where created. The most recent is always the best code! In the lists below, ACTIVE!! indicates applications that are actively maintained to test and support new functionality in the ICS components. These may not be simplest samples, but are usually the first to try when learning about a component. Delphi Win32/Win64 Web Browser sample application ------------------------------------------------- .\Samples\delphi\BroswerDemo > FrameBrowserIcs.dpr Web Browser using HtmlViewer component - ACTIVE!! Note this sample needs HtmlViewer component installed Delphi Win32/Win64 FTP sample applications ------------------------------------------ .\Samples\delphi\FtpDemos\FtpDemos.bpg - Project group > OverbyteIcsBasFtp.dpr Basic FTP client program > OverbyteIcsConFtp.dpr Basic console mode FTP client > OverbyteIcsFtpAsy.dpr Example of asynchronous FTP client > OverbyteIcsFtpMulti.dpr Demo to do several FTP downloads in parallel to get a list of files > OverbyteIcsFtpMultipartDownload.dpr Demo to FTP download a single large file in several parts in parallel > OverbyteIcsFtpServ.dpr General purpose FTP server, uses TSocketServer - ACTIVE!! > OverbyteIcsFtpThrd.dpr Demo of multithreaded FTP client, see also FTPASY > OverbyteIcsFtpTst.dpr Basic graphical FTP client - ACTIVE!! Delphi Win32/Win64 SMTP, POP3, NNTP sample applications ------------------------------------------------------- .\Samples\delphi\MailNewsDemos\MailNewsDemos.bpg - Project group > OverbyteIcsBasNntp.dpr Basic NNTP client program > OverbyteIcsConPop3.dpr Basic console mode demo for POP3 (mail receive) > OverbyteIcsConSmtp.dpr Basic console mode demo for SMTP (mail send) > OverbyteIcsMailHtml.dpr Example of HTML formatted EMail sending, including embedded images - ACTIVE!! > OverbyteIcsMailRcv.dpr Internet EMail access using POP3 protocol - ACTIVE!! > OverbyteIcsMailSnd.dpr Example of EMail sending using SMTP, including file attach - ACTIVE!! > OverbyteIcsMailSndAsync.dpr Example of parallel EMail sending with multiple connections > OverbyteIcsMimeDemo.dpr Example of EMail decoding (attached files are extracted) - ACTIVE!! > OverbyteIcsNewsReader.dpr Example of TNntpCli component (Send/receive newsgroups) - ACTIVE!! > OverbyteIcsSmtpServer.dpr Internet EMail server using SMTP protocol - ACTIVE!! Delphi Win32/Win64 Miscellaneous applications --------------------------------------------- .\Samples\delphi\MiscDemos\MiscDemos.bpg - Project group > OverbyteIcsBufStrmTst.dpr Test of buffered stream classes > OverbyteIcsCacheTest.dpr Test of TCacheTree class used in TSslAvlSessionCache > OverbyteIcsMD4Test.dpr Test program for MD4 unit > OverbyteIcsMD5File.dpr Example of MD5 unit: computer MD5 checksum for files > OverbyteIcsMD5Test.dpr Test program for MD5 unit > OverbyteIcsOneTimePassword.dpr One Time Password test routines for OverByteIcsOneTimePw unit > OverbyteIcsSHA1Test.dpr Test program for SHA unit > OverbyteIcsThreadTimerDemo.dpr Demo for TIcsThreadTimer > OverbyteIcsTicks64Demo.dpr GetTickCount64 test routines for OverbyteIcsTicks64 unit > OverbyteIcsTimerDemo.dpr Very simple demo for TIcsTimer > OverByteIcsWndControlTest.dpr Test program for windows and threads Delphi Win32/Win64 DNS, Ping, SNMP, Syslog sample applications -------------------------------------------------------------- .\Samples\delphi\OtherDemos\OtherDemos.bpg - Project group > OverbyteIcsBatchDnsLookup.dpr Batch async DNS lookup using DnsLookup (IPv6 and IPv4) > OverbyteIcsConPing.dpr Basic console mode demo for ping component > OverbyteIcsDll1.dpr Demo showing how to use a TWSocket component in a DLL > OverbyteIcsDll2.dpr Demo showing how to use a THttpCli component in a DLL > OverbyteIcsDllTst.dpr Test program calling ICSDLL1 and ICSDLL2 > OverbyteIcsDnsLook.dpr Example of name resolution (IPv6 and IPv4) > OverbyteIcsDnsResolver.dpr Batch async DNS lookup event driven using DnsQuery > OverbyteIcsFinger.dpr Example of TFingerCli component > OverbyteIcsNsLookup.dpr Demo for the DnsQuery component > OverbyteIcsPingTst.dpr Demo for the ping component, includes trace route > OverbyteIcsSnmpCliTst.dpr Demo for SNMP (simple network management protocol) component > OverbyteIcsSysLogClientDemo.dpr Demo for SysLog client component > OverbyteIcsSysLogServerDemo.dpr Demo for SysLog server component Delphi FireMonkey cross-platform samples (Delphi XE2 and later) --------------------------------------------------------------- All these samples may be built for Mac OS X (and Windows). .\Samples\delphi\PlatformDemos\XSamples.groupproj > IcsCliDemo.dproj Example of client for SRVDEMO, IPV4 only > IcsTcpSrvIPv6.dproj Basic server without client forms, event-driven, IPv4/IPV6 > IcsConSmtp.dproj Basic console mode demo for SMTP (mail send) > IcsMailSnd.dproj Example of EMail sending using SMTP, including file attach > IcsMailRcv.dproj Internet EMail access using POP3 protocol > IcsHttpsTst.dproj Example of THttpCli component (GET), show many features > IcsWebServ.dproj Demo of HTTP server, uses TSocketServer > IcsWebAppServ.dproj Advanced HTTP server demo, uses WebServ, adds sessions > IcsFtpTst.dproj Basic graphical FTP client > IcsFtpServ.dproj General purpose FTP server, uses TSocketServer > IcsUdpLstn.dproj UDP listen demo > IcsUdpSend.dproj UDP send demo > IcsBatchDnsLookup.dproj Batch async DNS lookup using DnsLookup (IPv6 and IPv4) > IcsDll1.dproj Demo showing how to use a TWSocket component in a DLL > IcsDll2.dproj Demo showing how to use a THttpCli component in a DLL > IcsDllTst.dproj Test program calling ICSDLL1 and ICSDLL2 > IcsThreadTimerDemo.dproj Very simple demo for TIcsTimer Delphi Win32/Win64 Socket sample applications --------------------------------------------- .\Samples\delphi\SocketDemos\SocketDemos.bpg - Project group > OverbyteIcsBinCliDemo.dpr Client program to receive binary and delimited text data. Works with BinTcpSrv demo. > OverbyteIcsCliDemo.dpr Example of client for SRVDEMO, IPV4 only - ACTIVE!! > OverbyteIcsClient5.dpr Basic client GUI applications > OverbyteIcsClient7.dpr Simple client application demonstrating TWSocket > OverbyteIcsConCli1.dpr Basic client/server console applications > OverbyteIcsConCli2.dpr Basic client/server console applications with thread > OverbyteIcsConSrv1.dpr Basic server application in console mode > OverbyteIcsConUdpLstn.dpr Console application to listen for UDP messages > OverbyteIcsDynCli.dpr Demo of dynamically created TWSocket components > OverbyteIcsMtSrv.dpr Basic server, multi-threaded, see THRDSRV for better code > OverbyteIcsRecv.dpr Simple file receive (server), use with SENDER demo (client) > OverbyteIcsSender.dpr Simple file send (client), use with RECV demo (server) > OverbyteIcsServer5.dpr Basic server GUI applications > OverbyteIcsSocksTst.dpr How to use TWSocket with SOCKS protocol (firewall traversing) > OverbyteIcsSrvDemo.dpr Example of server using a TTable - ACTIVE!! > OverbyteIcsSrvTcp.dpr Basic server without client forms, event-driven > OverbyteIcsSvcTcp.dpr Same as SRVTCP but as an NT/2K/XP service > OverbyteIcsTWSChat.dpr Chat program (both client and server in a single program) > OverbyteIcsTcpSrv.dpr Basic server without client forms, event-driven, IPv4 only - ACTIVE!! > OverbyteIcsTcpSrvIPv6.dpr Basic server without client forms, event-driven, IPv4/IPV6 - ACTIVE!! > OverbyteIcsTelnetClient.dpr Telnet client using a TnEmulVT > OverbyteIcsThrdSrv.dpr Basic multithreaded TCP server, banner sent in main thread > OverbyteIcsThrdSrvV2.dpr Basic multithreaded TCP server, banner sent in worker thread > OverbyteIcsThrdSrvV3.dpr Basic TCP server showing how to use TWSocketThrdServer > OverbyteIcsTnDemo.dpr Telnet client using a TMemo > OverbyteIcsTnSrv.dpr Basic TCP server with client forms, event-driven > OverbyteIcsUdpLstn.dpr UDP listen demo > OverbyteIcsUdpSend.dpr UDP send demo Delphi Win32/Win64 SSL-enabled sample applications -------------------------------------------------- .\Samples\delphi\sslinternet\SslDemos.bpg - Project group > OverbyteIcsHttpsTst.dpr Example of TSslHttpCli component (GET) - ACTIVE!! > OverbyteIcsPemTool.dpr ICS Pem Certificate Tool - Create and import certificates in OpenSLL PEM format > OverbyteIcsSimpleSslCli.dpr Example of simple SSL client using TSslWSocket - ACTIVE!! > OverbyteIcsSimpleSslServer.dpr Example of SSL server using TSslWSocket - ACTIVE!! > OverbyteIcsSslFtpServ.dpr General purpose FTP SSL server, uses TSocketServer - ACTIVE!! > OverbyteIcsSslFtpTst.dpr Basic graphical FTP SSL client - ACTIVE!! > OverbyteIcsSslMailRcv.dpr Internet EMail access using POP3 protocol and SSL - ACTIVE!! > OverbyteIcsSslMailSnd.dpr Example of EMail sending using SMTP and SSL - ACTIVE!! > OverbyteIcsSslNewsRdr.dpr Example of TSslNntpCli component (Send/receive newsgroups) - ACTIVE!! > OverbyteIcsMsVerify.dpr Verify and show an OpenSSL certificate or certificate chain using class TMsCertChainEngine which uses MS crypto API - ACTIVE!! > OverbyteIcsSslSniSrv.dpr Test of Server Name Indication (SNI) in server mode - ACTIVE!! > OverbyteIcsSslWebServ.dpr Demo of HTTPS server, uses TSocketServer - ACTIVE!! > OverbyteIcsSslWebAppServer.dpr Advanced HTTPS server demo, uses WebServ, adds sessions - ACTIVE!! > OverbyteIcsSslSmtpServer.dpr Internet EMail server using SMTP protocol and SSL - ACTIVE!! Delphi Win32/Win64 HTTP sample applications ------------------------------------------- .\Samples\delphi\WebDemos\WebDemos.bpg - Project group > OverbyteIcsConHttp.dpr Basic console mode HTTP client > OverbyteIcsHttpAsp.dpr Example of THttpCli component with cookie (POST to an ASP page) > OverbyteIcsHttpAsy.dpr Example of THttpCli component with multiple async requests (GET) > OverbyteIcsHttpChk.dpr Example of THttpCli to check for valid URL using HEAD request > OverbyteIcsHttpDmo.dpr Simple HTTP client demo with proxy > OverbyteIcsHttpGet.dpr Example of THttpCli component (GET into a file) > OverbyteIcsHttpMultipartDownload.dpr Demo application for TMultipartHttpDownloader to download files using simultaneous connections > OverbyteIcsHttpPg.dpr Example of THttpCli component (POST to CGI script) > OverbyteIcsHttpPost.dpr Example of THttpCli component (POST), work with WebServ sample - ACTIVE!! > OverbyteIcsHttpThrd.dpr Example of THttpCli component (multi-threaded GET) > OverbyteIcsHttpTst.dpr Example of THttpCli component (GET), show many features - ACTIVE!! > OverbyteIcsIsapi.dll Example of FTP client component within an ISAPI extension > OverbyteIcsWebAppServer.dpr Advanced HTTP server demo, uses WebServ, adds sessions - ACTIVE!! > OverbyteIcsWebServ.dpr Demo of HTTP server, uses TSocketServer - ACTIVE!! Two samples are not in the project group since they need extra components installed > OverbyteIcsRestDemo.drp Demo program showing how to use REST API from Google and Yahoo > OverbyteIcsRestJsonDemo.drp Demo program showing how to use REST API from Google Search and JSON Sample Notes ------------ Note 1: Not all samples have been rewritten in C++ for C++ Builder. And those rewritten are frequently much simpler. So C++ Builder user: have a look at the Delphi sample too ! Note 2: Follow "UserMade" link on ICS web site to find more sample programs written by ICS users. As explained in the component installation, you may encounter an error loading a sample application or running it. This may be because the last time I loaded the form, I was using another Delphi or C++ Builder version which has new properties. You can safely ignore messages related to those new properties. They are not used in the samples. (The properties are CharSet, OldCreateOrder and others). You can also encounter error about duplicate resources. You can ignore them safely. If you have those errors, open each form in the IDE, ignore the error then recompile. If you don't open the form in the IDE, you'll get the errors at runtime and your program will abort. When installing a new version, always delete old dcu, obj, dcpil and always recompile everything ! Close everything before recompiling the library or packages. When installing a new version, be sure to unzip it in the same directory tree as the old one or you'll mess both versions. About SSL: ---------- TSslWSocket and TSslWSocketServer component are derived from the standard TWSocket and TWSocketServer component. The SSL code is compiled into the component only if you define USE_SSL symbol to your packages and projects. Just add USE_SSL to the defines in the project or package options and recompile everything. The components make use of LIBEAY32.DLL and SSLEAY32.DLL to handle SSL protocol stuff. The DLLs are dynamically loaded at runtime. It means that the DLLs will only be required at runtime when you first make use of a SSL function. Your applications will run on systems without OpenSSL DLLs as long as you don't call any SSL function. The files may be downloaded from: http://wiki.overbyte.be/wiki/index.php/ICS_Download Most ICS components have their SSL enabled counter part. They work exactly the same way as the regular component except when SSL specific stuff is needed, for example certificates. To support SSL stuff, the SSL-enabled version use some new properties, events and methods. Many sample programs have their SSL-enabled counter part in a separate sources located in SslInternet folder. SSL certificates: To make use of SSL, you frequently need certificates. I provide some demo certificates I built using command line OpenSSL tool. PEM certificates can be opened by a text editor, LF as well as CRLF are allowed as line breaks. CACERT.PEM : A demo certificate for "Example CA" 01CERT.PEM : A demo certificate which is signed by CACERT.PEM 01KEY.PEM : A demo private key for 01CERT.PEM Passphrase is "password". CLIENT.PEM : A demo certificate and private key. Passphrase is "password". SERVER.PEM : A demo certificate and private key. Passphrase is "password". ROOT.PEM : A demo CA certificate. Passphrase is "password". TRUSTEDCABUNDLE.PEM : A demo CA file in PEM format containing multiple well known root CA certificates to be specified in property CA Path of the demo applications. Read the comments included in this file. 6F6359FC.0 : Located in sub directory SslInternet\TrustedCaStore, it's the file CACERT.PEM stored with a hashed file name. Directory TrustedCaStore can be specified in property CA Path of the demo applications. For details about certificate, see the excellent book: "Network security with OpenSSL", O'Reilly, ISBN 10: 0-596-00270-X The SSL demo project OverbyteIcsPemTool may be used to create self signed PEM certificates, certificate requests for commercial use, to convert existing certificates in the Windows Certificate Store to PEM format understood by OpenSSL and to examine PEM certificates. You will find more information in IcsSslHowTo.txt file. Commercial SSL certificates: To avoid browsers giving certificate warning messages, you need to purchase a SSL certificate from one of numerous companies, such as Verisign, Thawte GeoTrust or RapidSSL. Prices vary dramatically and are often cheaper from resellers such as Servertastic than from the main issuing companies. The main purpose of an SSL certificate is to prove the identity of the owner of a web site, ideally the company behind the web site. That usually requires paper work identifying the company is submitted and also proof the domain being protected is owned by that company, it usually also involves telephone calls. Such certificates are usually called fully validated and cost $120 or more each year for a single domain, ie secure.website.com. Wild card certificates cost $350 or more, but protect multiple sub-domains, ie web.website.com as well. Extended Validation certificates cost from $450 a year, and show the company name in green in the address bar. For testing and simple use, instant issued SSL certificates cost from $15 per year and protect a single domain only with automated checking reducing the cost (an email to admin@website.com to prove you receive email for the domain, perhaps a telephone call as well). Note these instant certificates do not include a company name. To buy and install an SSL certificate for use with ICS and OpenSSL follow these steps: 1 - Build the SSL demo project OverbyteIcsPemTool. Take Extras, Create Certificate Requests, fill in the various fields (check other certificates if uncertain, the Common Name is the domain to protect, ie secure.website.com and E-Mail should be an email address at the than domain, ideally admin or administrator, 2048 bits. Click Create, and specify two file names, first for the private key (mykey.pem) then the certificate request file (myreq.pem). The request can also be done using OpenSSL command line arguments, or you can build it into your own application. 2 - Choose you SSL supplier and certificate type, at some point during the ordering process you will be asked for the certificate request, so open the PEM file you saved with a text editor and copy the base64 encoded block starting -BEGIN CERTIFICATE REQUEST- into the web form. It should be decoded and displayed so you check it's correct. The private key is not needed for the certificate to be issued. At this point the validation process starts as mentioned above, which might take hours or weeks to complete. 3 - Eventually the SSL certificate should be issued, either by email or made available to download from the supplier's web site. It should be in X.509 format in a base64 encoded block starting -BEGIN CERTIFICATE- which should be saved as a PEM file (mycert.pem). There should also be an Intermediate CA certificate, with which your new certificate was signed, which should also be saved as a file (mycacert.pem). This may also be downloadable from the supplier as a bundle file and should be common to any certificates they issue, ie RapidSSL_CA_bundle.pem. 4 - The OverbyteIcsPemTool tool has a View PEM button that allows examination of your new PEM files. 5 - The three PEM files now need to be attached to the SslContext component in your application, with properties SslCertFile, SslPrivKeyFile and SslCAFile. The request certificate file has no further use. Support: -------- There is a mailing list to discuss F. Piette's components and applications. To subscribe surf to http://lists.elists.org/mailman/listinfo/twsocket. Do not use an aliased EMail address, use your real EMail address, the one you'll use to post messages. After asking for subscription, you'll receive a confirmation email you must reply to it or you will _not_ be added to the subscriber's list (this is to check for email path and also make sure someone doesn't subscribe you without your consent). Once you have been registered with the mailing list processor, you can send messages to twsocket@elists.org. Every subscriber will receive a copy of your message. I will respond, but anybody is welcome to respond to each other's messages. So every body can share his expertise. There are many other useful mailing lists at http://www.elists.org ! Before asking a question, browse the message archive you can download from the support page on the web site (click the "support" button from main page) and from the mailing list web site http://lists.elists.org/mailman/listinfo/twsocket. Google is also archiving the list with some delay. If you found a bug, please make a short program that reproduces the problem attach it to a message addressed to me. If I can reproduce the problem, I can find a fix ! Do not send exe file but just source code and instructions. Always use the latest version (beta if any) before reporting any bug. You are also encouraged to use the support mailing list to ask for enhancements. You are welcome to post your own code. The support mailing list has sometimes a heavy traffic. If it is too much for you, you can select "digest" mode in which mailing list processor will mail you only one big message per day. To select digest mode goto http://lists.elists.org/mailman/listinfo/twsocket. You can also subscribe to another mailing list called twsocket-announce which will receive only very few messages when major bug fixes or updates are done. The subscription process is the same as for the other mailing list. See above procedure. Release notes ------------- There is no global release notes. Each component and sample has his own history. You can find those histories in the comment in the beginning of each source file. There are also a bunch of useful comments in the source code. You should at least browse the source for the components you are interested in. MidWare ------- If you wants to build client/server applications using TCP/IP protocol, you can do it easily with ICS. But you can do it much more easily using another freeware product from Fran鏾is Piette: MidWare. Available from the same web site http://www.overbyte.be. francois.piette@overbyte.be francois.piette@swing.be http://www.overbyte.be/ http://wiki.overbyte.be/
集合了 所有的 Unix命令大全 登陆服务器时输入 公帐号 openlab-open123 telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss 老师测评网址 http://172.16.0.198:8080/poll/ 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ 一、注意事项 命令和参数之间必需用空格隔开,参数和参数之间也必需用空格隔开。 一行不能超过256个字符;大小写有区分。 二、特殊字符含义 文件名以“.”开头的都是隐藏文件/目录,只需在文件/目录名前加“.”就可隐藏它。 ~/ 表示主目录。 ./ 当前目录(一个点)。 ../ 上一级目录(两个点)。 ; 多个命令一起用。 > >> 输出重定向 。将一个命令的输出内容写入到一个文件里面。如果该文件存在, 就将该文件的内容覆盖; 如果不存在就先创建该文件, 然后再写入内容。 输出重定向,意思就是说,将原来屏幕输出变为文件输出,即将内容输到文件中。 < << 输入重定向。 本来命令是通过键盘得到输入的,但是用小于号,就能够使命令从文件中得到输入。 \ 表示未写完,回车换行再继续。 * 匹配零个或者多个字符。 ? 匹配一个字符。 [] 匹配中括号里的内容[a-z][A-Z][0-9]。 ! 事件。 $ 取环境变量的值。 | 管道。把前一命令的输出作为后一命令的输入,把几个命令连接起来。 |经常跟tee连用,tee 把内容保存到文档并显示出来。 三、通用后接命令符 -a 所有(all)。 -e 所有(every),比a更详细。 -f 取消保护。 -i 添加提示。 -p 强制执行。 -r 目录管理。 分屏显示的中途操作 空格 继续打开下一屏; 回车 继续打开下一行; b 另外开上一屏; f 另外开下一屏; h 帮助; q或Ctrl+C 退出; /字符串 从上往下查找匹配的字符串; ?字符串 从下往上查找匹配的字符串; n 继续查找。 四、退出命令 exit 退出; DOS内部命令 用于退出当前的命令处理器(COMMAND.COM) 恢复前一个命令处理器。 Ctrl+d 跟exit一样效果,表中止本次操作。 logout 当csh时可用来退出,其他shell不可用。 clear 清屏,清除(之前的内容并未删除,只是没看到,拉回上面可以看回)。 五、目录管理命令 pwd 显示当前所在目录,打印当前目录的绝对路径。 cd 进入某目录,DOS内部命令 显示或改变当前目录。 cd回车/cd ~ 都是回到自己的主目录。 cd . 当前目录(空格再加一个点)。 cd .. 回到上一级目录(空格再加两个点)。 cd ../.. 向上两级。 cd /user/s0807 从绝对路径去到某目录。 cd ~/s0807 直接进入主目录下的某目录(“cd ~"相当于主目录的路径的简写)。 ls 显示当前目录的所有目录和文件。 用法 ls [-aAbcCdeEfFghHilLmnopqrRstux1@] [file...] ls /etc/ 显示某目录下的所有文件和目录,如etc目录下的。 ls -l (list)列表显示文件(默认按文件名排序), 显示文件的权限、硬链接数(即包含文件数,普通文件是1,目录1+)、用户、组名、大小、修改日期、文件名。 ls -t (time)按修改时间排序,显示目录和文件。 ls -lt 是“-l”和“-t”的组合,按时间顺序显示列表。 ls -F 显示文件类型,目录“/ ”结尾;可执行文件“*”结尾;文本文件(none),没有结尾。 ls -R 递归显示目录结构。即该目录下的文件和各个副目录下的文件都一一显示。 ls -a 显示所有文件,包括隐藏文件。 文件权限 r 读权限。对普通文件来说,是读取该文件的权限;对目录来说,是获得该目录下的文件信息。 w 写权限。对文件,是修改;对目录,是增删文件与子目录。 (注 删除没有写权限的文件可以用 rm -f ,这是为了操作方便,是人性化的设计)。 x 执行权限;对目录,是进入该目录 - 表示没有权限 形式 - rw- r-- r-- 其中 第一个是文件类型(-表普通文件,d表目录,l表软链接文件) 第2~4个是属主,生成文件时登录的人,权限最高,用u表示 第5~7个是属组,系统管理员分配的同组的一个或几个人,用g表示 第8~10个是其他人,除属组外的人,用o表示 所有人,包括属主、属组及其他人,用a表示 chmod 更改权限; 用法 chmod [-fR] <绝对模式> 文件 ... chmod [-fR] <符号模式列表> 文件 ... 其中 <符号模式列表> 是一个用逗号分隔的表 [ugoa]{+|-|=}[rwxXlstugo] chmod u+rw 给用户加权限。同理,u-rw也可以减权限。 chmod u=rw 给用户赋权限。与加权限不一样,赋权限有覆盖的效果。 主要形式有如下几种 chmod u+rw chmod u=rw chmod u+r, u+w chmod u+rw,g+w, o+r chmod 777( 用数字的方式设置权限是最常用的) 数字表示权限时,各数位分别表示属主、属组及其他人; 其中,1是执行权(Execute),2是写权限(Write),4是读权限(Read), 具体权限相当于三种权限的数相加,如7=1+2+4,即拥有读写和执行权。 另外,临时文件/目录的权限为rwt,可写却不可删,关机后自动删除;建临时目录:chmod 777 目录名,再chmod +t 目录名。 id 显示用户有效的uid(用户字)和gid(组名) 用法 id [-ap] [user] id 显示自己的。 id root 显示root的。 id -a root 显示用户所在组的所有组名(如root用户,是所有组的组员) df 查看文件系统,查看数据区 用法 df [-F FSType] [-abeghklntVvZ] [-o FSType 特定选项] [目录 | 块设备 | 资源] df -k 以kbytes显示文件大小的查看文件系统方式 六、显示文件内容 more 分屏显示文件的内容。 用法 more [-cdflrsuw] [-行] [+行号] [+/模式] [文件名 ...]。 显示7个信息:用户名 密码 用户id(uid) 组id(gid) 描述信息(一般为空) 用户主目录 login shell(登录shell) cat 显示文件内容,不分屏(一般用在小文件,大文件显示不下);合并文件,仅在屏幕上合并,并不改变原文件。 用法 cat [ -usvtebn ] [-|文件] ... tail 实时监控文件,一般用在日志文件,可以只看其中的几行。 用法 tail [+/-[n][lbc][f]] [文件] tail [+/-[n][l][r|f]] [文件] 七、文件/目录的增删 echo 显示一行内容。 touch 如果文件/目录不存在,则创建新文件/目录;如果文件存在,那么就是更新该文件的最后访问时间, 用法 touch [-acm] [-r ref_file] 文件... touch [-acm] [MMDDhhmm[yy]] 文件... touch [-acm] [-t [[CC]YY]MMDDhhmm[.SS]] file... mkdir 创建目录(必须有创建目录的权限) 用法 mkdir [-m 模式] [-p] dirname ... mkdir dir1/dir2 在dir1下建dir2 mkdir dir13 dir4 dir5 连建多个 mkdir ~/games 用户主目录下建(默认在当前目录下创建) mkdir -p dir6/dir7/dir8 强制创建dir8;若没有前面的目录,会自动创建dir6和dir7。 不用-p时,若没有dir6/dir7,则创建失败。 cp 复制文件/目录 cp 源文件 目标文件 复制文件;若已有文件则覆盖 cp -r 源目录 目标目录 复制目录;若已有目录则把源目录复制到目标目录下, 没有目标目录时,相当于完全复制源目录,只是文件名不同。 cp beans apple dir2 把beans、apple文件复制到dir2目录下 cp -i beans apple 增加是否覆盖的提示 mv 移动或重命名文件/目录 用法 mv [-f] [-i] f1 f2 mv [-f] [-i] f1 ... fn d1 mv [-f] [-i] d1 d2 mv 源文件名 目标文件名 若目标文件名还没有,则是源文件重命名为目标文件;若目标文件已存在,则源文件覆盖目标文件。 mv 源文件名 目标目录 移动文件 mv 源目录 目标目录 若目标目录不存在,则源目录重命名;若目标目录已存在,则源目录移动到目标目录下。 rm 删除文件/目录 用法 rm [-fiRr] 文件 ... rm 文件名 删除文件。 rm -r 目录名 删除目录。 rm –f 文件 只要是该文件或者目录的拥有者,无论是否有权限删除,都可以用这个命令参数强行删除。 rm -rf * 删除所有文件及目录 rmdir 删除空目录。只可以删除空目录。 ln 创建硬链接或软链接,硬链接=同一文件的多个名字;软链接=快捷方式 用法 ln [-f] [-n] [-s] f1 [f2] ln [-f] [-n] [-s] f1 ... fn d1 ln [-f] [-n] -s d1 d2 ln file1 file1.ln 创建硬链接。感觉是同一文件,删除一个,对另一个没有影响;须两个都删除才算删除。 ln -s file1 file1.sln 创建软链接。可跨系统操作,冲破操作权限;也是快捷方式。 八、时间显示 date 显示时间,精确到秒 用法 date [-u] mmddHHMM[[cc]yy][.SS] date [-u] [+format] date -a [-]sss[.fff] cal 显示日历 cal 9 2008 显示2008年9月的日历; cal 显示当月的 用法 cal [ [月] 年 ] 九、帮助 man 帮助( format and display the on-line manual pages) 用法 man [-] [-adFlrt] [-M 路径] [-T 宏软件包] [-s 段] 名称 ... man [-] [-adFlrt] [-M path] [-T macro-package] [-s section] name... man [-M 路径] -k 关键字 ... man [-M 路径] -f 文件 ... awk 按一定格式输出(pattern scanning and processing language) 用法 awk [-Fc] [-f 源代码 | 'cmds'] [文件] 十、vi 底行模式 /? 命令模式 i a o 输入模式 vi 的使用方法 1、光标 h 左 j 下 k 上 l 右 set nu 显示行号(set nonu) 21 光标停在指定行 21G 第N行 (G到文件尾,1G到文件头) 如果要将光标移动到文件第一行,那么就按 1G H 屏幕头 M 屏幕中间 L 屏幕底 ^ 或 shift+6 行首 $ 或 shift+4 行尾 Ctrl+f 下翻 Ctrl+b 上翻 2、输入 (输入模式) o 光标往下换一行 O (大写字母o)在光标所在行上插入一空行 i 在光标所在位置的前面插入字母 a 在光标所在位置的后面插入一个新字母 退出插入状态。 3、修改替换 r 替换一个字符 dd 删除行,剪切行 (5dd删除5行) 5,10d 删除 5 至 10 行(包括第 5行和第 10 行) x 删除一个字符 dw 删除词,剪切词。 ( 3dw删除 3 单词) cw 替换一个单词。 (cw 和 dw 的区别 cw 删除某一个单词后直接进入编辑模式,而dw删除词后仍处于命令模式) cc 替换一行 C 替换从光标到行尾 yy 复制行 (用法同下的 Y ,见下行) Y 将光标移动到要复制行位置,按yy。当你想粘贴的时候,请将光标移动到你想复制的位置的前一个位置,然后按 p yw 复制词 p 当前行下粘贴 1,2co3 复制行1,2在行3之后 4,5m6 移动行4,5在行6之后 u 当你的前一个命令操作是一个误操作的时候,那么可以按一下 u键,即可复原。只能撤销一次 r file2 在光标所在处插入另一个文件 ~ 将字母变成大写 J 可以将当前行与下一行连接起来 /字符串 从上往下找匹配的字符串 ?字符串 从下往上找匹配的字符串 n 继续查找 1,$s/旧串/新串/g 替换全文(或者 %s/旧串/新串/g) (1表示从第一行开始) 没有g则只替换一次,加g替换所有 3、存盘和退出 w 存盘 w newfile 存成新文件 wq 存盘再退出VI(或者ZZ或 X) q! 强行退出不存盘 查看用户 users 显示在线用户(仅显示用户名)。 who 显示在线用户,但比users更详细,包括用户名、终端号、登录时间、IP地址。 who am i 仅显示自己,(但包括用户名、端口、登录时间、IP地址;信息量=who)。 whoami 也仅显示自己,但只有用户名(仅显示自己的有效的用户名)。 w 显示比who更多内容,还包括闲置时间、占CPU、平均占用CPU、执行命令。 用法 w [ -hlsuw ] [ 用户 ] su 改变用户,需再输入密码。 用法 su [-] [ username [ arg ... ] ] su - 相当于退出再重新登录。 查找 find 查找文件 用法 find [-H | -L] 路径列表 谓词列表 find / -name perl 从根目录开始查找名为perl的文件。 find . -mtime 10 -print 从当前目录查找距离现在10天时修改的文件,显示在屏幕上。 (注 “10”表示第10天的时候;如果是“+10”表示10天以外的范围;“-10”表示10天以内的范围。) grep 文件中查找字符;有过滤功能,只列出想要的内容 用法 grep -hblcnsviw 模式 文件 . . . 如 grep abc /etc/passwd 在passwd文件下找abc字符 wc 统计 -l 统计行数; -w统计单词数; -c 统计字符数 如 grep wang /etc/passwd|wc -l 统计passwd文件含“wang”的行数 du 查看目录情况 如 du -sk * 不加-s会显示子目录,-k按千字节排序 用法 du [-a] [-d] [-h|-k] [-r] [-o|-s] [-H|-L] [文件...] 进程管理 ps 显示进程。 用法 ps [ -aAdeflcjLPyZ ] [ -o 格式 ] [ -t 项列表 ] [ -u 用户列表 ] [ -U 用户列表 ] [ -G 组列表 ] [ -p 进程列表 ] [ -g 程序组列表 ] [ -s 标识符列表 ] [ -z 区域列表 ] ps 显示自己的进程。 ps -e 显示每个进程,包括空闲进程。 ps -f 显示详情。 ps -ef 组合-e和-f,所有进程的详情。 ps -U uidlist(用户列表) 具体查看某人的进程。 kill pkill sleep jobs 用法 jobs [-l ] fg %n bg %n stop %n 挂起(仅csh能用) Ctrl+C Ctrl+Z 网络链接 ping usage ping host [timeout] usage ping -s [-l | U] [adLnRrv] [-A addr_family] [-c traffic_class] [-g gateway [-g gateway ...]] [-F flow_label] [-I interval] [-i interface] [-P tos] [-p port] [-t ttl] host [data_size] [npackets] ifconfig -a /sbin/ifconfig 查看本机的IP地址 netstat -rn rlogin ftp 帮助文件 [sd0807@localhost ~]$ help GNU bash, version 3.1.17(1)-release (i686-redhat-linux-gnu) These shell commands are defined internally. Type `help' to see this list. Type `help name' to find out more about the function `name'. Use `info bash' to find out more about the shell in general. Use `man -k' or `info' to find out more about commands not in this list. A star (*) next to a name means that the command is disabled. JOB_SPEC [&] (( expression )) . filename [arguments] [ arg... ] [[ expression ]] alias [-p] [name[=value] ... ] bg [job_spec ...] bind [-lpvsPVS] [-m keymap] [-f fi break [n] builtin [shell-builtin [arg ...]] caller [EXPR] case WORD in [PATTERN [| PATTERN]. cd [-L|-P] [dir] command [-pVv] command [arg ...] compgen [-abcdefgjksuv] [-o option complete [-abcdefgjksuv] [-pr] [-o continue [n] declare [-afFirtx] [-p] [name[=val dirs [-clpv] [+N] [-N] disown [-h] [-ar] [jobspec ...] echo [-neE] [arg ...] enable [-pnds] [-a] [-f filename] eval [arg ...] exec [-cl] [-a name] file [redirec exit [n] export [-nf] [name[=value] ...] or false fc [-e ename] [-nlr] [first] [last fg [job_spec] for NAME [in WORDS ... ;] do COMMA for (( exp1; exp2; exp3 )); do COM function NAME { COMMANDS ; } or NA getopts optstring name [arg] hash [-lr] [-p pathname] [-dt] [na help [-s] [pattern ...] history [-c] [-d offset] [n] or hi if COMMANDS; then COMMANDS; [ elif jobs [-lnprs] [jobspec ...] or job kill [-s sigspec | -n signum | -si let arg [arg ...] local name[=value] ... logout popd [+N | -N] [-n] printf [-v var] format [arguments] pushd [dir | +N | -N] [-n] pwd [-LP] read [-ers] [-u fd] [-t timeout] [ readonly [-af] [name[=value] ...] return [n] select NAME [in WORDS ... ;] do CO set [--abefhkmnptuvxBCHP] [-o option] [arg ...] shift [n] shopt [-pqsu] [-o long-option] opt source filename [arguments] suspend [-f] test [expr] time [-p] PIPELINE times trap [-lp] [arg signal_spec ...] true type [-afptP] name [name ...] typeset [-afFirtx] [-p] name[=valu ulimit [-SHacdfilmnpqstuvx] [limit umask [-p] [-S] [mode] unalias [-a] name [name ...] unset [-f] [-v] [name ...] until COMMANDS; do COMMANDS; done variables - Some variable names an wait [n] while COMMANDS; do COMMANDS; done { COMMANDS ; } 输入 man help BASH_BUILTINS(1) BASH_BUILTINS(1) NAME bash, :, ., [, alias, bg, bind, break, builtin, cd, command, compgen, complete, continue, declare, dirs, disown, echo, enable, eval, exec, exit, export, fc, fg, getopts, hash, help, history, jobs, kill, let, local, logout, popd, printf, pushd, pwd, read, readonly, return, set, shift, shopt, source, suspend, test, times, trap, type, typeset, ulimit, umask, una- lias, unset, wait - bash built-in commands, see bash(1) BASH BUILTIN COMMANDS Unless otherwise noted, each builtin command documented in this section as accepting options preceded by - accepts -- to signify the end of the options. For example, the :, true, false, and test builtins do not accept options. : [arguments] No effect; the command does nothing beyond expanding arguments and performing any specified redirections. A zero exit code is returned. . filename [arguments] source filename [arguments] Read and execute commands from filename in the current shell environment and return the exit status of the last command executed from filename. If filename does not contain a slash, file names in PATH are used to find the directory containing file- name. The file searched for in PATH need not be executable. When bash is not in posix mode, the current directory is searched if no file is found in PATH. If the sourcepath option to the shopt builtin command is turned off, the PATH is not searched. If any arguments are supplied, they become the positional parameters when filename is executed. Otherwise the positional parameters are unchanged. The return status is the status of the last command exited within the script (0 if no commands are executed), and false if filename is not found or cannot be read. alias [-p] [name[=value] ...] Alias with no arguments or with the -p option prints the list of aliases in the form alias name=value on standard output. When arguments are supplied, an alias is defined for each name whose value is given. A trailing space in value causes the next word to be checked for alias substitution when the alias is expanded. For each name in the argument list for which no value is supplied, the name and value of the alias is printed. Alias returns true unless a name is given for which no alias has been defined. bg [jobspec ...] Resume each suspended job jobspec in the background, as if it had been started with &. If jobspec is not present, the shell’s notion of the current job is used. bg jobspec returns 0 unless run when job control is disabled or, when run with job con- trol enabled, any specified jobspec was not found or was started without job control. bind [-m keymap] [-lpsvPSV] bind [-m keymap] [-q function] [-u function] [-r keyseq] bind [-m keymap] -f filename bind [-m keymap] -x keyseq:shell-command bind [-m keymap] keyseq:function-name bind readline-command Display current readline key and function bindings, bind a key sequence to a readline function or macro, or set a readline variable. Each non-option argument is a command as it would appear in .inputrc, but each binding or command must be passed as a sepa- rate argument; e.g., ’"\C-x\C-r": re-read-init-file’. Options, if supplied, have the following meanings: -m keymap Use keymap as the keymap to be affected by the subsequent bindings. Accept- able keymap names are emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, vi-command, and vi-insert. vi is equivalent to vi-command; emacs is equivalent to emacs-standard. -l List the names of all readline functions. -p Display readline function names and bindings in such a way that they can be re-read. -P List current readline function names and bindings. -v Display readline variable names and values in such a way that they can be re- read. -V List current readline variable names and values. -s Display readline key sequences bound to macros and the strings they output in such a way that they can be re-read. -S Display readline key sequences bound to macros and the strings they output. -f filename Read key bindings from filename. -q function Query about which keys invoke the named function. -u function Unbind all keys bound to the named function. -r keyseq Remove any current binding for keyseq. -x keyseq:shell-command Cause shell-command to be executed whenever keyseq is entered. The return value is 0 unless an unrecognized option is given or an error occurred. break [n] Exit from within a for, while, until, or select loop. If n is specified, break n levels. n must be ≥ 1. If n is greater than the number of enclosing loops, all enclosing loops are exited. The return value is 0 unless the shell is not executing a loop when break is executed. builtin shell-builtin [arguments] Execute the specified shell builtin, passing it arguments, and return its exit sta- tus. This is useful when defining a function whose name is the same as a shell builtin, retaining the functionality of the builtin within the function. The cd builtin is commonly redefined this way. The return status is false if shell-builtin is not a shell builtin command. cd [-L|-P] [dir] Change the current directory to dir. The variable HOME is the default dir. The variable CDPATH defines the search path for the directory containing dir. Alterna- tive directory names in CDPATH are separated by a colon (:). A null directory name in CDPATH is the same as the current directory, i.e., ‘‘.’’. If dir begins with a slash (/), then CDPATH is not used. The -P option says to use the physical directory structure instead of following symbolic links (see also the -P option to the set builtin command); the -L option forces symbolic links to be followed. An argument of - is equivalent to $OLDPWD. If a non-empty directory name from CDPATH is used, or if - is the first argument, and the directory change is successful, the absolute path- name of the new working directory is written to the standard output. The return value is true if the directory was successfully changed; false otherwise. caller [expr] Returns the context of any active subroutine call (a shell function or a script exe- cuted with the . or source builtins. Without expr, caller displays the line number and source filename of the current subroutine call. If a non-negative integer is supplied as expr, caller displays the line number, subroutine name, and source file corresponding to that position in the current execution call stack. This extra information may be used, for example, to print a stack trace. The current frame is frame 0. The return value is 0 unless the shell is not executing a subroutine call or expr does not correspond to a valid position in the call stack. command [-pVv] command [arg ...] Run command with args suppressing the normal shell function lookup. Only builtin com- mands or commands found in the PATH are executed. If the -p option is given, the search for command is performed using a default value for PATH that is guaranteed to find all of the standard utilities. If either the -V or -v option is supplied, a description of command is printed. The -v option causes a single word indicating the command or file name used to invoke command to be displayed; the -V option produces a more verbose description. If the -V or -v option is supplied, the exit status is 0 if command was found, and 1 if not. If neither option is supplied and an error occurred or command cannot be found, the exit status is 127. Otherwise, the exit status of the command builtin is the exit status of command. compgen [option] [word] Generate possible completion matches for word according to the options, which may be any option accepted by the complete builtin with the exception of -p and -r, and write the matches to the standard output. When using the -F or -C options, the vari- ous shell variables set by the programmable completion facilities, while available, will not have useful values. The matches will be generated in the same way as if the programmable completion code had generated them directly from a completion specification with the same flags. If word is specified, only those completions matching word will be displayed. The return value is true unless an invalid option is supplied, or no matches were generated. complete [-abcdefgjksuv] [-o comp-option] [-A action] [-G globpat] [-W wordlist] [-P prefix] [-S suffix] [-X filterpat] [-F function] [-C command] name [name ...] complete -pr [name ...] Specify how arguments to each name should be completed. If the -p option is sup- plied, or if no options are supplied, existing completion specifications are printed in a way that allows them to be reused as input. The -r option removes a completion specification for each name, or, if no names are supplied, all completion specifica- tions. The process of applying these completion specifications when word completion is attempted is described above under Programmable Completion. Other options, if specified, have the following meanings. The arguments to the -G, -W, and -X options (and, if necessary, the -P and -S options) should be quoted to protect them from expansion before the complete builtin is invoked. -o comp-option The comp-option controls several aspects of the compspec’s behavior beyond the simple generation of completions. comp-option may be one of: bashdefault Perform the rest of the default bash completions if the compspec gen- erates no matches. default Use readline’s default filename completion if the compspec generates no matches. dirnames Perform directory name completion if the compspec generates no matches. filenames Tell readline that the compspec generates filenames, so it can per- form any filename-specific processing (like adding a slash to direc- tory names or suppressing trailing spaces). Intended to be used with shell functions. nospace Tell readline not to append a space (the default) to words completed at the end of the line. plusdirs After any matches defined by the compspec are generated, directory name completion is attempted and any matches are added to the results of the other actions. -A action The action may be one of the following to generate a list of possible comple- tions: alias Alias names. May also be specified as -a. arrayvar Array variable names. binding Readline key binding names. builtin Names of shell builtin commands. May also be specified as -b. command Command names. May also be specified as -c. directory Directory names. May also be specified as -d. disabled Names of disabled shell builtins. enabled Names of enabled shell builtins. export Names of exported shell variables. May also be specified as -e. file File names. May also be specified as -f. function Names of shell functions. group Group names. May also be specified as -g. helptopic Help topics as accepted by the help builtin. hostname Hostnames, as taken from the file specified by the HOSTFILE shell variable. job Job names, if job control is active. May also be specified as -j. keyword Shell reserved words. May also be specified as -k. running Names of running jobs, if job control is active. service Service names. May also be specified as -s. setopt Valid arguments for the -o option to the set builtin. shopt Shell option names as accepted by the shopt builtin. signal Signal names. stopped Names of stopped jobs, if job control is active. user User names. May also be specified as -u. variable Names of all shell variables. May also be specified as -v. -G globpat The filename expansion pattern globpat is expanded to generate the possible completions. -W wordlist The wordlist is split using the characters in the IFS special variable as delimiters, and each resultant word is expanded. The possible completions are the members of the resultant list which match the word being completed. -C command command is executed in a subshell environment, and its output is used as the possible completions. -F function The shell function function is executed in the current shell environment. When it finishes, the possible completions are retrieved from the value of the COMPREPLY array variable. -X filterpat filterpat is a pattern as used for filename expansion. It is applied to the list of possible completions generated by the preceding options and argu- ments, and each completion matching filterpat is removed from the list. A leading ! in filterpat negates the pattern; in this case, any completion not matching filterpat is removed. -P prefix prefix is added at the beginning of each possible completion after all other options have been applied. -S suffix suffix is appended to each possible completion after all other options have been applied. The return value is true unless an invalid option is supplied, an option other than -p or -r is supplied without a name argument, an attempt is made to remove a comple- tion specification for a name for which no specification exists, or an error occurs adding a completion specification. continue [n] Resume the next iteration of the enclosing for, while, until, or select loop. If n is specified, resume at the nth enclosing loop. n must be ≥ 1. If n is greater than the number of enclosing loops, the last enclosing loop (the ‘‘top-level’’ loop) is resumed. The return value is 0 unless the shell is not executing a loop when con- tinue is executed. declare [-afFirtx] [-p] [name[=value] ...] typeset [-afFirtx] [-p] [name[=value] ...] Declare variables and/or give them attributes. If no names are given then display the values of variables. The -p option will display the attributes and values of each name. When -p is used, additional options are ignored. The -F option inhibits the display of function definitions; only the function name and attributes are printed. If the extdebug shell option is enabled using shopt, the source file name and line number where the function is defined are displayed as well. The -F option implies -f. The following options can be used to restrict output to variables with the specified attribute or to give variables attributes: -a Each name is an array variable (see Arrays above). -f Use function names only. -i The variable is treated as an integer; arithmetic evaluation (see ARITHMETIC EVALUATION ) is performed when the variable is assigned a value. -r Make names readonly. These names cannot then be assigned values by subsequent assignment statements or unset. -t Give each name the trace attribute. Traced functions inherit the DEBUG and RETURN traps from the calling shell. The trace attribute has no special mean- ing for variables. -x Mark names for export to subsequent commands via the environment. Using ‘+’ instead of ‘-’ turns off the attribute instead, with the exception that +a may not be used to destroy an array variable. When used in a function, makes each name local, as with the local command. If a variable name is followed by =value, the value of the variable is set to value. The return value is 0 unless an invalid option is encountered, an attempt is made to define a function using ‘‘-f foo=bar’’, an attempt is made to assign a value to a readonly variable, an attempt is made to assign a value to an array variable without using the compound assignment syntax (see Arrays above), one of the names is not a valid shell variable name, an attempt is made to turn off readonly status for a readonly variable, an attempt is made to turn off array status for an array variable, or an attempt is made to display a non-exis- tent function with -f. dirs [-clpv] [+n] [-n] Without options, displays the list of currently remembered directories. The default display is on a single line with directory names separated by spaces. Directories are added to the list with the pushd command; the popd command removes entries from the list. +n Displays the nth entry counting from the left of the list shown by dirs when invoked without options, starting with zero. -n Displays the nth entry counting from the right of the list shown by dirs when invoked without options, starting with zero. -c Clears the directory stack by deleting all of the entries. -l Produces a longer listing; the default listing format uses a tilde to denote the home directory. -p Print the directory stack with one entry per line. -v Print the directory stack with one entry per line, prefixing each entry with its index in the stack. The return value is 0 unless an invalid option is supplied or n indexes beyond the end of the directory stack. disown [-ar] [-h] [jobspec ...] Without options, each jobspec is removed from the table of active jobs. If the -h option is given, each jobspec is not removed from the table, but is marked so that SIGHUP is not sent to the job if the shell receives a SIGHUP. If no jobspec is present, and neither the -a nor the -r option is supplied, the current job is used. If no jobspec is supplied, the -a option means to remove or mark all jobs; the -r option without a jobspec argument restricts operation to running jobs. The return value is 0 unless a jobspec does not specify a valid job. echo [-neE] [arg ...] Output the args, separated by spaces, followed by a newline. The return status is always 0. If -n is specified, the trailing newline is suppressed. If the -e option is given, interpretation of the following backslash-escaped characters is enabled. The -E option disables the interpretation of these escape characters, even on systems where they are interpreted by default. The xpg_echo shell option may be used to dynamically determine whether or not echo expands these escape characters by default. echo does not interpret -- to mean the end of options. echo interprets the following escape sequences: \a alert (bell) \b backspace \c suppress trailing newline \e an escape character \f form feed \n new line \r carriage return \t horizontal tab \v vertical tab \\ backslash \0nnn the eight-bit character whose value is the octal value nnn (zero to three octal digits) \nnn the eight-bit character whose value is the octal value nnn (one to three octal digits) \xHH the eight-bit character whose value is the hexadecimal value HH (one or two hex digits) enable [-adnps] [-f filename] [name ...] Enable and disable builtin shell commands. Disabling a builtin allows a disk command which has the same name as a shell builtin to be executed without specifying a full pathname, even though the shell normally searches for builtins before disk commands. If -n is used, each name is disabled; otherwise, names are enabled. For example, to use the test binary found via the PATH instead of the shell builtin version, run ‘‘enable -n test’’. The -f option means to load the new builtin command name from shared object filename, on systems that support dynamic loading. The -d option will delete a builtin previously loaded with -f. If no name arguments are given, or if the -p option is supplied, a list of shell builtins is printed. With no other option arguments, the list consists of all enabled shell builtins. If -n is supplied, only disabled builtins are printed. If -a is supplied, the list printed includes all builtins, with an indication of whether or not each is enabled. If -s is supplied, the output is restricted to the POSIX special builtins. The return value is 0 unless a name is not a shell builtin or there is an error loading a new builtin from a shared object. eval [arg ...] The args are read and concatenated together into a single command. This command is then read and executed by the shell, and its exit status is returned as the value of eval. If there are no args, or only null arguments, eval returns 0. exec [-cl] [-a name] [command [arguments]] If command is specified, it replaces the shell. No new process is created. The arguments become the arguments to command. If the -l option is supplied, the shell places a dash at the beginning of the zeroth arg passed to command. This is what login(1) does. The -c option causes command to be executed with an empty environ- ment. If -a is supplied, the shell passes name as the zeroth argument to the exe- cuted command. If command cannot be executed for some reason, a non-interactive shell exits, unless the shell option execfail is enabled, in which case it returns failure. An interactive shell returns failure if the file cannot be executed. If command is not specified, any redirections take effect in the current shell, and the return status is 0. If there is a redirection error, the return status is 1. exit [n] Cause the shell to exit with a status of n. If n is omitted, the exit status is that of the last command executed. A trap on EXIT is executed before the shell termi- nates. export [-fn] [name[=word]] ... export -p The supplied names are marked for automatic export to the environment of subsequently executed commands. If the -f option is given, the names refer to functions. If no names are given, or if the -p option is supplied, a list of all names that are exported in this shell is printed. The -n option causes the export property to be removed from each name. If a variable name is followed by =word, the value of the variable is set to word. export returns an exit status of 0 unless an invalid option is encountered, one of the names is not a valid shell variable name, or -f is sup- plied with a name that is not a function. fc [-e ename] [-nlr] [first] [last] fc -s [pat=rep] [cmd] Fix Command. In the first form, a range of commands from first to last is selected from the history list. First and last may be specified as a string (to locate the last command beginning with that string) or as a number (an index into the history list, where a negative number is used as an offset from the current command number). If last is not specified it is set to the current command for listing (so that ‘‘fc -l -10’’ prints the last 10 commands) and to first otherwise. If first is not speci- fied it is set to the previous command for editing and -16 for listing. The -n option suppresses the command numbers when listing. The -r option reverses the order of the commands. If the -l option is given, the commands are listed on standard output. Otherwise, the editor given by ename is invoked on a file contain- ing those commands. If ename is not given, the value of the FCEDIT variable is used, and the value of EDITOR if FCEDIT is not set. If neither variable is set, is used. When editing is complete, the edited commands are echoed and executed. In the second form, command is re-executed after each instance of pat is replaced by rep. A useful alias to use with this is ‘‘r="fc -s"’’, so that typing ‘‘r cc’’ runs the last command beginning with ‘‘cc’’ and typing ‘‘r’’ re-executes the last command. If the first form is used, the return value is 0 unless an invalid option is encoun- tered or first or last specify history lines out of range. If the -e option is sup- plied, the return value is the value of the last command executed or failure if an error occurs with the temporary file of commands. If the second form is used, the return status is that of the command re-executed, unless cmd does not specify a valid history line, in which case fc returns failure. fg [jobspec] Resume jobspec in the foreground, and make it the current job. If jobspec is not present, the shell’s notion of the current job is used. The return value is that of the command placed into the foreground, or failure if run when job control is dis- abled or, when run with job control enabled, if jobspec does not specify a valid job or jobspec specifies a job that was started without job control. getopts optstring name [args] getopts is used by shell procedures to parse positional parameters. optstring con- tains the option characters to be recognized; if a character is followed by a colon, the option is expected to have an argument, which should be separated from it by white space. The colon and question mark characters may not be used as option char- acters. Each time it is invoked, getopts places the next option in the shell vari- able name, initializing name if it does not exist, and the index of the next argument to be processed into the variable OPTIND. OPTIND is initialized to 1 each time the shell or a shell script is invoked. When an option requires an argument, getopts places that argument into the variable OPTARG. The shell does not reset OPTIND auto- matically; it must be manually reset between multiple calls to getopts within the same shell invocation if a new set of parameters is to be used. When the end of options is encountered, getopts exits with a return value greater than zero. OPTIND is set to the index of the first non-option argument, and name is set to ?. getopts normally parses the positional parameters, but if more arguments are given in args, getopts parses those instead. getopts can report errors in two ways. If the first character of optstring is a colon, silent error reporting is used. In normal operation diagnostic messages are printed when invalid options or missing option arguments are encountered. If the variable OPTERR is set to 0, no error messages will be displayed, even if the first character of optstring is not a colon. If an invalid option is seen, getopts places ? into name and, if not silent, prints an error message and unsets OPTARG. If getopts is silent, the option character found is placed in OPTARG and no diagnostic message is printed. If a required argument is not found, and getopts is not silent, a question mark (?) is placed in name, OPTARG is unset, and a diagnostic message is printed. If getopts is silent, then a colon (:) is placed in name and OPTARG is set to the option charac- ter found. getopts returns true if an option, specified or unspecified, is found. It returns false if the end of options is encountered or an error occurs. hash [-lr] [-p filename] [-dt] [name] For each name, the full file name of the command is determined by searching the directories in $PATH and remembered. If the -p option is supplied, no path search is performed, and filename is used as the full file name of the command. The -r option causes the shell to forget all remembered locations. The -d option causes the shell to forget the remembered location of each name. If the -t option is supplied, the full pathname to which each name corresponds is printed. If multiple name arguments are supplied with -t, the name is printed before the hashed full pathname. The -l option causes output to be displayed in a format that may be reused as input. If no arguments are given, or if only -l is supplied, information about remembered commands is printed. The return status is true unless a name is not found or an invalid option is supplied. help [-s] [pattern] Display helpful information about builtin commands. If pattern is specified, help gives detailed help on all commands matching pattern; otherwise help for all the builtins and shell control structures is printed. The -s option restricts the infor- mation displayed to a short usage synopsis. The return status is 0 unless no command matches pattern. history [n] history -c history -d offset history -anrw [filename] history -p arg [arg ...] history -s arg [arg ...] With no options, display the command history list with line numbers. Lines listed with a * have been modified. An argument of n lists only the last n lines. If the shell variable HISTTIMEFORMAT is set and not null, it is used as a format string for strftime(3) to display the time stamp associated with each displayed history entry. No intervening blank is printed between the formatted time stamp and the history line. If filename is supplied, it is used as the name of the history file; if not, the value of HISTFILE is used. Options, if supplied, have the following meanings: -c Clear the history list by deleting all the entries. -d offset Delete the history entry at position offset. -a Append the ‘‘new’’ history lines (history lines entered since the beginning of the current bash session) to the history file. -n Read the history lines not already read from the history file into the current history list. These are lines appended to the history file since the begin- ning of the current bash session. -r Read the contents of the history file and use them as the current history. -w Write the current history to the history file, overwriting the history file’s contents. -p Perform history substitution on the following args and display the result on the standard output. Does not store the results in the history list. Each arg must be quoted to disable normal history expansion. -s Store the args in the history list as a single entry. The last command in the history list is removed before the args are added. If the HISTTIMEFORMAT is set, the time stamp information associated with each history entry is written to the history file. The return value is 0 unless an invalid option is encountered, an error occurs while reading or writing the history file, an invalid offset is supplied as an argument to -d, or the history expansion supplied as an argument to -p fails. jobs [-lnprs] [ jobspec ... ] jobs -x command [ args ... ] The first form lists the active jobs. The options have the following meanings: -l List process IDs in addition to the normal information. -p List only the process ID of the job’s process group leader. -n Display information only about jobs that have changed status since the user was last notified of their status. -r Restrict output to running jobs. -s Restrict output to stopped jobs. If jobspec is given, output is restricted to information about that job. The return status is 0 unless an invalid option is encountered or an invalid jobspec is sup- plied. If the -x option is supplied, jobs replaces any jobspec found in command or args with the corresponding process group ID, and executes command passing it args, returning its exit status. kill [-s sigspec | -n signum | -sigspec] [pid | jobspec] ... kill -l [sigspec | exit_status] Send the signal named by sigspec or signum to the processes named by pid or jobspec. sigspec is either a case-insensitive signal name such as SIGKILL (with or without the SIG prefix) or a signal number; signum is a signal number. If sigspec is not present, then SIGTERM is assumed. An argument of -l lists the signal names. If any arguments are supplied when -l is given, the names of the signals corresponding to the arguments are listed, and the return status is 0. The exit_status argument to -l is a number specifying either a signal number or the exit status of a process termi- nated by a signal. kill returns true if at least one signal was successfully sent, or false if an error occurs or an invalid option is encountered. let arg [arg ...] Each arg is an arithmetic expression to be evaluated (see ARITHMETIC EVALUATION). If the last arg evaluates to 0, let returns 1; 0 is returned otherwise. local [option] [name[=value] ...] For each argument, a local variable named name is created, and assigned value. The option can be any of the options accepted by declare. When local is used within a function, it causes the variable name to have a visible scope restricted to that function and its children. With no operands, local writes a list of local variables to the standard output. It is an error to use local when not within a function. The return status is 0 unless local is used outside a function, an invalid name is sup- plied, or name is a readonly variable. logout Exit a login shell. popd [-n] [+n] [-n] Removes entries from the directory stack. With no arguments, removes the top direc- tory from the stack, and performs a cd to the new top directory. Arguments, if sup- plied, have the following meanings: +n Removes the nth entry counting from the left of the list shown by dirs, start- ing with zero. For example: ‘‘popd +0’’ removes the first directory, ‘‘popd +1’’ the second. -n Removes the nth entry counting from the right of the list shown by dirs, starting with zero. For example: ‘‘popd -0’’ removes the last directory, ‘‘popd -1’’ the next to last. -n Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. If the popd command is successful, a dirs is performed as well, and the return status is 0. popd returns false if an invalid option is encountered, the directory stack is empty, a non-existent directory stack entry is specified, or the directory change fails. printf [-v var] format [arguments] Write the formatted arguments to the standard output under the control of the format. The format is a character string which contains three types of objects: plain charac- ters, which are simply copied to standard output, character escape sequences, which are converted and copied to the standard output, and format specifications, each of which causes printing of the next successive argument. In addition to the standard printf(1) formats, %b causes printf to expand backslash escape sequences in the cor- responding argument (except that \c terminates output, backslashes in \', \", and \? are not removed, and octal escapes beginning with \0 may contain up to four digits), and %q causes printf to output the corresponding argument in a format that can be reused as shell input. The -v option causes the output to be assigned to the variable var rather than being printed to the standard output. The format is reused as necessary to consume all of the arguments. If the format requires more arguments than are supplied, the extra format specifications behave as if a zero value or null string, as appropriate, had been supplied. The return value is zero on success, non-zero on failure. pushd [-n] [dir] pushd [-n] [+n] [-n] Adds a directory to the top of the directory stack, or rotates the stack, making the new top of the stack the current working directory. With no arguments, exchanges the top two directories and returns 0, unless the directory stack is empty. Arguments, if supplied, have the following meanings: +n Rotates the stack so that the nth directory (counting from the left of the list shown by dirs, starting with zero) is at the top. -n Rotates the stack so that the nth directory (counting from the right of the list shown by dirs, starting with zero) is at the top. -n Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. dir Adds dir to the directory stack at the top, making it the new current working directory. If the pushd command is successful, a dirs is performed as well. If the first form is used, pushd returns 0 unless the cd to dir fails. With the second form, pushd returns 0 unless the directory stack is empty, a non-existent directory stack element is specified, or the directory change to the specified new current directory fails. pwd [-LP] Print the absolute pathname of the current working directory. The pathname printed contains no symbolic links if the -P option is supplied or the -o physical option to the set builtin command is enabled. If the -L option is used, the pathname printed may contain symbolic links. The return status is 0 unless an error occurs while reading the name of the current directory or an invalid option is supplied. read [-ers] [-u fd] [-t timeout] [-a aname] [-p prompt] [-n nchars] [-d delim] [name ...] One line is read from the standard input, or from the file descriptor fd supplied as an argument to the -u option, and the first word is assigned to the first name, the second word to the second name, and so on, with leftover words and their intervening separators assigned to the last name. If there are fewer words read from the input stream than names, the remaining names are assigned empty values. The characters in IFS are used to split the line into words. The backslash character (\) may be used to remove any special meaning for the next character read and for line continuation. Options, if supplied, have the following meanings: -a aname The words are assigned to sequential indices of the array variable aname, starting at 0. aname is unset before any new values are assigned. Other name arguments are ignored. -d delim The first character of delim is used to terminate the input line, rather than newline. -e If the standard input is coming from a terminal, readline (see READLINE above) is used to obtain the line. -n nchars read returns after reading nchars characters rather than waiting for a com- plete line of input. -p prompt Display prompt on standard error, without a trailing newline, before attempt- ing to read any input. The prompt is displayed only if input is coming from a terminal. -r Backslash does not act as an escape character. The backslash is considered to be part of the line. In particular, a backslash-newline pair may not be used as a line continuation. -s Silent mode. If input is coming from a terminal, characters are not echoed. -t timeout Cause read to time out and return failure if a complete line of input is not read within timeout seconds. This option has no effect if read is not reading input from the terminal or a pipe. -u fd Read input from file descriptor fd. If no names are supplied, the line read is assigned to the variable REPLY. The return code is zero, unless end-of-file is encountered, read times out, or an invalid file descriptor is supplied as the argument to -u. readonly [-apf] [name[=word] ...] The given names are marked readonly; the values of these names may not be changed by subsequent assignment. If the -f option is supplied, the functions corresponding to the names are so marked. The -a option restricts the variables to arrays. If no name arguments are given, or if the -p option is supplied, a list of all readonly names is printed. The -p option causes output to be displayed in a format that may be reused as input. If a variable name is followed by =word, the value of the vari- able is set to word. The return status is 0 unless an invalid option is encountered, one of the names is not a valid shell variable name, or -f is supplied with a name that is not a function. return [n] Causes a function to exit with the return value specified by n. If n is omitted, the return status is that of the last command executed in the function body. If used outside a function, but during execution of a script by the . (source) command, it causes the shell to stop executing that script and return either n or the exit status of the last command executed within the script as the exit status of the script. If used outside a function and not during execution of a script by ., the return status is false. Any command associated with the RETURN trap is executed before execution resumes after the function or script. set [--abefhkmnptuvxBCHP] [-o option] [arg ...] Without options, the name and value of each shell variable are displayed in a format that can be reused as input for setting or resetting the currently-set variables. Read-only variables cannot be reset. In posix mode, only shell variables are listed. The output is sorted according to the current locale. When options are specified, they set or unset shell attributes. Any arguments remaining after the options are processed are treated as values for the positional parameters and are assigned, in order, to $1, $2, ... $n. Options, if specified, have the following meanings: -a Automatically mark variables and functions which are modified or created for export to the environment of subsequent commands. -b Report the status of terminated background jobs immediately, rather than before the next primary prompt. This is effective only when job control is enabled. -e Exit immediately if a simple command (see SHELL GRAMMAR above) exits with a non-zero status. The shell does not exit if the command that fails is part of the command list immediately following a while or until keyword, part of the test in an if statement, part of a && or ││ list, or if the command’s return value is being inverted via !. A trap on ERR, if set, is executed before the shell exits. -f Disable pathname expansion. -h Remember the location of commands as they are looked up for execution. This is enabled by default. -k All arguments in the form of assignment statements are placed in the environ- ment for a command, not just those that precede the command name. -m Monitor mode. Job control is enabled. This option is on by default for interactive shells on systems that support it (see JOB CONTROL above). Back- ground processes run in a separate process group and a line containing their exit status is printed upon their completion. -n Read commands but do not execute them. This may be used to check a shell script for syntax errors. This is ignored by interactive shells. -o option-name The option-name can be one of the following: allexport Same as -a. braceexpand Same as -B. emacs Use an emacs-style command line editing interface. This is enabled by default when the shell is interactive, unless the shell is started with the --noediting option. errtrace Same as -E. functrace Same as -T. errexit Same as -e. hashall Same as -h. histexpand Same as -H. history Enable command history, as described above under HISTORY. This option is on by default in interactive shells. ignoreeof The effect is as if the shell command ‘‘IGNOREEOF=10’’ had been exe- cuted (see Shell Variables above). keyword Same as -k. monitor Same as -m. noclobber Same as -C. noexec Same as -n. noglob Same as -f. nolog Currently ignored. notify Same as -b. nounset Same as -u. onecmd Same as -t. physical Same as -P. pipefail If set, the return value of a pipeline is the value of the last (rightmost) command to exit with a non-zero status, or zero if all command

16,467

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧