In Feburary 2016 30,
Open a command prompt window on a Windows computer or a terminal window on a Linux computer.
Type the command 'ftp hostname' to log into the FTP server. Replace 'hostname' with the host name or IP address of the FTP server.
Type the command 'delete dir_name/*' to delete the files within the directory. Replace 'dir_name' with the name of the directory that you want to delete.
Type the command 'rmdir dir_name' to remove the directory.
Type the command 'quit' to close the FTP session.
In Feburary 2016 30,
Showing posts with label command. Show all posts
Showing posts with label command. Show all posts
Tuesday, 1 March 2016
Monday, 29 February 2016
How to Specify a Port on the FTP Command LineIn Feburary 2016 29,
In Feburary 2016 29,
Click 'Start.'
Type 'cmd' into the search box.
Press 'Enter' to open the command prompt.
Type 'ftp example.com xx' into the Command Prompt, with 'xx' being the port that you need to specify.
Press 'Enter' to connect to the remote server.
In Feburary 2016 29,
Click 'Start.'
Type 'cmd' into the search box.
Press 'Enter' to open the command prompt.
Type 'ftp example.com xx' into the Command Prompt, with 'xx' being the port that you need to specify.
Press 'Enter' to connect to the remote server.
In Feburary 2016 29,
Sunday, 28 February 2016
How to Upload PSD FilesIn Feburary 2016 28,
In Feburary 2016 28,
Click the 'Start' button and choose 'Run' from the file options. Windows Vista users can skip to the next step.
Type 'CMD' (minus the quotes) and press 'Enter.' This will open a command window.
Navigate to the folder where your PSD files are located.
Check the size of your PSD files to make sure you are uploading the correct one. Type 'ftp' (minus the quotes) and press enter.
Type 'Open ftp.xxxxxxxx.com' (minus the quotes) and press 'Enter.' Substitute your FTP site for the aforementioned address.
You will be prompted to enter a user name if you have successfully connected to the server. Type your user name and press 'Enter.'
You will be prompted to enter a password if your user name has been accepted. Type your password and press 'Enter.'
Once your credentials have been accepted, you will be given an 'FTP' prompt. Navigate to the directory folder where you would like to store your PSD files. Alternatively, if you would like to create a folder, you can do this by typing 'MKDIR' (minus the quotes). You will be asked for your folder name.
Upload your PSD file by typing 'put abc.psd' (minus the quotes). Substitute the name of your file for abc.
Once the transmission is complete, the FTP server will report to you the size of the file and how long it took to upload. Repeat Step 9 for as many files as you would like to upload.
Type 'bye' (minus the quotes) when you are finished uploading your files. This command will disconnect you from the FTP server.
Type 'exit' (minus the quotes) to close the command window.
In Feburary 2016 28,
Click the 'Start' button and choose 'Run' from the file options. Windows Vista users can skip to the next step.
Type 'CMD' (minus the quotes) and press 'Enter.' This will open a command window.
Navigate to the folder where your PSD files are located.
Check the size of your PSD files to make sure you are uploading the correct one. Type 'ftp' (minus the quotes) and press enter.
Type 'Open ftp.xxxxxxxx.com' (minus the quotes) and press 'Enter.' Substitute your FTP site for the aforementioned address.
You will be prompted to enter a user name if you have successfully connected to the server. Type your user name and press 'Enter.'
You will be prompted to enter a password if your user name has been accepted. Type your password and press 'Enter.'
Once your credentials have been accepted, you will be given an 'FTP' prompt. Navigate to the directory folder where you would like to store your PSD files. Alternatively, if you would like to create a folder, you can do this by typing 'MKDIR' (minus the quotes). You will be asked for your folder name.
Upload your PSD file by typing 'put abc.psd' (minus the quotes). Substitute the name of your file for abc.
Once the transmission is complete, the FTP server will report to you the size of the file and how long it took to upload. Repeat Step 9 for as many files as you would like to upload.
Type 'bye' (minus the quotes) when you are finished uploading your files. This command will disconnect you from the FTP server.
Type 'exit' (minus the quotes) to close the command window.
In Feburary 2016 28,
Saturday, 27 February 2016
How to Send a File to an IP Address With Command PromptIn Feburary 2016 27,
In Feburary 2016 27,
Click 'Start' and type 'run' into the search box. Click on the 'Run' link, then type 'cmd' and press 'Enter.' Click on the new window to select it.
Change the command prompt's current directory to the folder containing the file you want to send by typing the following command:cd '\myFiles\projectA'Replace '\myFiles\projectA' with the full path to the folder containing the file. Press 'Enter.'
Type the following command to launch the command-line FTP client on your prompt:ftp 74.120.4.80Replace '74.120.4.80' with the IP address of the computer where you want to send the file. Press 'Enter.' The FTP client will await your next command on its own command prompt.
Type the following command:put myFile.docReplace 'myFile.doc' with the name of the file you want to send. Press 'Enter.' After a delay that depends on the file's size, the FTP client will return control to you. At that point, the file will have been successfully sent to the remote IP address.
Type the following command:byePress 'Enter.' The FTP client will exit to the usual command prompt.
In Feburary 2016 27,
Click 'Start' and type 'run' into the search box. Click on the 'Run' link, then type 'cmd' and press 'Enter.' Click on the new window to select it.
Change the command prompt's current directory to the folder containing the file you want to send by typing the following command:cd '\myFiles\projectA'Replace '\myFiles\projectA' with the full path to the folder containing the file. Press 'Enter.'
Type the following command to launch the command-line FTP client on your prompt:ftp 74.120.4.80Replace '74.120.4.80' with the IP address of the computer where you want to send the file. Press 'Enter.' The FTP client will await your next command on its own command prompt.
Type the following command:put myFile.docReplace 'myFile.doc' with the name of the file you want to send. Press 'Enter.' After a delay that depends on the file's size, the FTP client will return control to you. At that point, the file will have been successfully sent to the remote IP address.
Type the following command:byePress 'Enter.' The FTP client will exit to the usual command prompt.
In Feburary 2016 27,
Friday, 26 February 2016
How to Write a Batch ScriptIn Feburary 2016 26,
In Feburary 2016 26,
Hit the Windows logo and 'R' keys on the keyboard simultaneously. This will bring up the 'Run' dialog box. In the box, type 'notepad' and hit 'Enter.'
Type 'c:\Progra~1\Intern~1\iexplore.exe http://www.ehow.com' into the window. This command will open an Internet Explorer window, and Internet Explorer will browse directly to the index page of eHow upon being opened.
Click 'File,' then click 'Save As.'
Click the drop-down menu next to 'Save as type,' and choose 'All Files.'
Navigate to your desktop. Name the file 'TestBatch.bat' and click 'Save.'
Double click the batch file. If you performed the above steps correctly, an Internet Explorer window to eHow will be opened.
In Feburary 2016 26,
Hit the Windows logo and 'R' keys on the keyboard simultaneously. This will bring up the 'Run' dialog box. In the box, type 'notepad' and hit 'Enter.'
Type 'c:\Progra~1\Intern~1\iexplore.exe http://www.ehow.com' into the window. This command will open an Internet Explorer window, and Internet Explorer will browse directly to the index page of eHow upon being opened.
Click 'File,' then click 'Save As.'
Click the drop-down menu next to 'Save as type,' and choose 'All Files.'
Navigate to your desktop. Name the file 'TestBatch.bat' and click 'Save.'
Double click the batch file. If you performed the above steps correctly, an Internet Explorer window to eHow will be opened.
In Feburary 2016 26,
Wednesday, 24 February 2016
How to Change a Directory in FTPIn Feburary 2016 24,
In Feburary 2016 24,
Open the Start menu and click on the 'Run' button.
Type 'cmd' into the text field and hit the 'Enter' key. A command prompt window will now open on the screen.
Type 'ftp server.com' into the command prompt window, replacing 'server.com' with the address of your FTP server, and hit 'Enter.'
Enter your FTP username and password when prompted to log in to the server.
Type 'cd' followed by the path of the directory that you want to switch to and hit 'Enter.' The 'cd' command stands for change directory, and if you provide a valid directory path to change to, you will receive a confirmation message.
In Feburary 2016 24,
Open the Start menu and click on the 'Run' button.
Type 'cmd' into the text field and hit the 'Enter' key. A command prompt window will now open on the screen.
Type 'ftp server.com' into the command prompt window, replacing 'server.com' with the address of your FTP server, and hit 'Enter.'
Enter your FTP username and password when prompted to log in to the server.
Type 'cd' followed by the path of the directory that you want to switch to and hit 'Enter.' The 'cd' command stands for change directory, and if you provide a valid directory path to change to, you will receive a confirmation message.
In Feburary 2016 24,
Tuesday, 23 February 2016
How to Add New Users to LinuxIn Feburary 2016 23,
In Feburary 2016 23,
You can also add a user from the command line. Open a terminal window and type 'sudo adduser ' followed by the username. Type your password if prompted by sudo. Enter a new Linux password for the user and then type it a second time to confirm it. Provide the full name, room number, work phone, home phone and other information as prompted, or press 'Enter' to leave a field blank. Type 'Y' and press 'Enter' to confirm you want to add the new user.
In Feburary 2016 23,
You can also add a user from the command line. Open a terminal window and type 'sudo adduser ' followed by the username. Type your password if prompted by sudo. Enter a new Linux password for the user and then type it a second time to confirm it. Provide the full name, room number, work phone, home phone and other information as prompted, or press 'Enter' to leave a field blank. Type 'Y' and press 'Enter' to confirm you want to add the new user.
In Feburary 2016 23,
Saturday, 20 February 2016
How to Start CentOS GUI From the Command LineIn Feburary 2016 20,
In Feburary 2016 20,
Log in to the CentOS operating system.
Type the command 'su -' to switch to a root session.
Type the command:yum groupinstall 'X Windows System' 'GNOME Desktop Environment'
or
yum groupinstall 'X Windows System' 'KDE Desktop Environment' to install your preferred desktop environment.
Type the command 'startx' to start the X windows system and your preferred desktop environment.
In Feburary 2016 20,
Log in to the CentOS operating system.
Type the command 'su -' to switch to a root session.
Type the command:yum groupinstall 'X Windows System' 'GNOME Desktop Environment'
or
yum groupinstall 'X Windows System' 'KDE Desktop Environment' to install your preferred desktop environment.
Type the command 'startx' to start the X windows system and your preferred desktop environment.
In Feburary 2016 20,
Friday, 19 February 2016
How Does an FTP Work?In Feburary 2016 19,
In Feburary 2016 19,
File Transfer Protocol (FTP) is the protocol used to transfer files between devices on the Internet. Particularly useful for larger files, FTP is a more robust and more capable protocol than the Hypertext Transfer Protocol (HTTP) used to deliver web pages and smaller files from a server to a client by way of a web browser. Since no special browser is required, FTP is also more universal. All major operating systems, including Mac OS, Windows and Linux allow FTP file transfers directly from the command line. Graphical FTP programs do exist though, and help organize and facilitate bulk file transfers that would otherwise require considerable manual input. By using FTP to transfer files between clients and servers, or between network servers, FTP helps webmasters publish the files that drive the Internet.
FTP Transfers Work in Sessions
In order to transfer a file from a client to a server, or to download a file from a server to a computer, a user must authenticate, or identify himself, when logging on to an FTP server. By authenticating, the user creates a session on the server during which he can transfer or modify as many files as necessary. The authentication process also allows remote hosts to set proper file permissions, keeping users from viewing files or directories to which they do not have access, and allowing an individual user to set read, write, and execute permissions on his own files or subdirectories. When the user session is complete, the user simply disconnects from the server and the session is closed. Some FTP servers also allow 'anonymous' connections, where members of the public can connect anonymously to the FTP server and initiate file transfers; these settings are generally used when publicly available information--like program files released for free--needs to be available for download by knowledgeable users.
FTP Uses Multiple Ports
The File Transfer Protocol is unique among protocols used on the Internet in that it actually works across two ports: one port for issuing commands and conveying other administrative information between the client and server, and a separate port for actually transferring files. Users can also transfer files in either an 'active' or a 'passive' mode, allowing flexibility for file transfers from behind a network firewall or other situation that may present difficulty in transferring files.
In Feburary 2016 19,
File Transfer Protocol (FTP) is the protocol used to transfer files between devices on the Internet. Particularly useful for larger files, FTP is a more robust and more capable protocol than the Hypertext Transfer Protocol (HTTP) used to deliver web pages and smaller files from a server to a client by way of a web browser. Since no special browser is required, FTP is also more universal. All major operating systems, including Mac OS, Windows and Linux allow FTP file transfers directly from the command line. Graphical FTP programs do exist though, and help organize and facilitate bulk file transfers that would otherwise require considerable manual input. By using FTP to transfer files between clients and servers, or between network servers, FTP helps webmasters publish the files that drive the Internet.
FTP Transfers Work in Sessions
In order to transfer a file from a client to a server, or to download a file from a server to a computer, a user must authenticate, or identify himself, when logging on to an FTP server. By authenticating, the user creates a session on the server during which he can transfer or modify as many files as necessary. The authentication process also allows remote hosts to set proper file permissions, keeping users from viewing files or directories to which they do not have access, and allowing an individual user to set read, write, and execute permissions on his own files or subdirectories. When the user session is complete, the user simply disconnects from the server and the session is closed. Some FTP servers also allow 'anonymous' connections, where members of the public can connect anonymously to the FTP server and initiate file transfers; these settings are generally used when publicly available information--like program files released for free--needs to be available for download by knowledgeable users.
FTP Uses Multiple Ports
The File Transfer Protocol is unique among protocols used on the Internet in that it actually works across two ports: one port for issuing commands and conveying other administrative information between the client and server, and a separate port for actually transferring files. Users can also transfer files in either an 'active' or a 'passive' mode, allowing flexibility for file transfers from behind a network firewall or other situation that may present difficulty in transferring files.
In Feburary 2016 19,
Labels:
bulk,
Clients,
command,
considerable,
facilitate,
input,
manual,
organize,
require,
transfers
Wednesday, 17 February 2016
How to Restart MySQL in PleskIn Feburary 2016 17,
In Feburary 2016 17,
Log in to your server computer using administrative rights.
Open the terminal window based on the kind of operating system you are using.
Type the following command to restart MySQL for Linux-based systems and press the 'Enter' key:/etc/rc.d/init.d/mysqld restart
Type the following command to restart MySQL for FreeBSD systems and press the 'Enter' key:/usr/local/etc/rc.d/mysql-server.sh restart
Close your terminal window once you have finished restarting your MySQL server.
In Feburary 2016 17,
Log in to your server computer using administrative rights.
Open the terminal window based on the kind of operating system you are using.
Type the following command to restart MySQL for Linux-based systems and press the 'Enter' key:/etc/rc.d/init.d/mysqld restart
Type the following command to restart MySQL for FreeBSD systems and press the 'Enter' key:/usr/local/etc/rc.d/mysql-server.sh restart
Close your terminal window once you have finished restarting your MySQL server.
In Feburary 2016 17,
Tuesday, 16 February 2016
Kerberos StepIn Feburary 2016 16,
In Feburary 2016 16,
Before you begin setting up Kerberos on your system, you should know the name of your Kerberos, the hostname of the master and slave Key Distribution Centers (KDC) and how you are going to map your hostnames in the Kerberos realm. You will need to determine the ports that the KDCs and the database access (kadmin) services will use. You will also have to know how frequently the master and slave KDCs will fill the database.You will use the above information to configure the master KDC. The master KDC configuration files will be found at '/etc/krb5.conf' and '/usr/local/var/krb5kdc/kdc.conf' and can be edited in any text editor. The 'krb5.conf' file contains information about where to locate the KDCs and admin servers, as well as the host name mapping information. The 'kdc.conf' file contains the default information used when issuing Kerberos tickets. Open the '/etc/krb5.conf' and edit the 'login,' 'realms' and 'domain_realm' values so that they are correct for your system. Change the '/usr/local/var/krb5kdc/kdc.conf' so that it reflects the correct information for your KDC server.The next step is to create the database. Open a terminal and type the command 'kdb5_util.' You will be asked to provide a master key. This should be a string of letters, numbers and special characters similar to a password. This key will be stored in a stash file on the KDC's hard drive. If you would rather be prompted for the key whenever Kerberos starts, you can choose to not create the stash file.Finally, you will create the Access Control List (ACL) and add at least one administrator to it. The ACL is a user created text file that is called '/usr/local/var/krb5kdc/kadm5.acl.' This file should have the administrator listed in the form:
Kerberos_principal permissions [target_principal] [restrictions]
Once the ACL list is created, issue the command 'kadmin.local' and add each principal to the database. Start the Kerberos daemons with the command '/usr/local/sbin/krb5kdc; /usr/local/sbin/kadmin.'
Creating the Keytab File
The keytab file is used to decrypt the Kerberos tickets and determine whether the user should have access to the database. In order to create this file, type the command 'kadmin.local' again. This will provide you with a prompt where you will type the command: 'ktadd -k /usr/local/var/krb5kdc/kadm5.keytab kadmin/admin kadmin/changepw' to create the keytab file. Replace the section '/usr/local/var/krb5kdc/kadm5.keytab' with the keytab location that was specified in the '/usr/local/var/krb5kdc/kdc.conf' file. Type 'quit' to exit the 'kadmin' utility.
Configuring the Slave KDCs
To create the slave KDCs, you will issue the 'kadmin.local' command a third time. At the prompt, issue the command 'addprinc-randkey host/example.com' for the Master and each slave. Use the host name of each KDC in place of 'example.conf.' This will create host keys for each of the KDCs. Next, extract the keys on each of the slave KDCs by starting the 'kadmin' utility on each of the slaves and issuing the command 'ktadd host/MasterKDC.com.' Replace 'MasterKDC.com' with the host name of the master KDC.For the database to be propagated from the master KDC to the slave KDCs you will have to create a file called '/usr/local/var/krb5kdc/kpropd.acl.' This file must contain the principals for each of the KDCs in the form 'host/example.com.' Each principal should be placed on its own line. Next, edit the '/etc/inetd.conf' file on each of the KDCS and add the following lines:
krb5_prop stream tcp nowait root /usr/local/sbin/kpropd kpropd
eklogin stream tcp nowait root /usr/local/sbin/klogind klogind -k -c -eEdit the '/etc/services' file on each of the KDCs and add the following lines:
kerberos 88/udp kdc # Kerberos authentication (udp)
kerberos 88/tcp kdc # Kerberos authentication (tcp)
krb5_prop 754/tcp # Kerberos slave propagation
kerberos-adm 749/tcp # Kerberos 5 admin/changepw (tcp)
kerberos-adm 749/udp # Kerberos 5 admin/changepw (udp)
eklogin 2105/tcp # Kerberos encrypted rlogin
Propagating the Database
Propagating the database is done from the Master KDC. Issue the command '/usr/local/sbin/kdb5_util dump /usr/local/var/krb5kdc/slave_datatrans' to create a dump of the database. Next, issue the command ' /usr/local/sbin/kprop -f /usr/local/var/krb5kdc/slave_datatrans Slave-1.example.com' to manually propagate the database on each of the slaves. These steps will need to be completed on a regular basis. The easiest way to do this is to create as script and run the script as a cron job. The script should look like:!/bin/sh
kdclist = 'slave-1.example.com slave-2.example.com'/usr/local/sbin/kdb5_util 'dump
=> /usr/local/var/krb5kdc/slave_datatrans'for kdc in $kdclist
do
/usr/local/sbin/kprop -f /usr/local/var/krb5kdc/slave_datatrans $kdc
done
Of course, change the host names to reflect the values for your system.
Create Stash Files on the Slaves
The final step to setting up Kerberos is to create stash files on the slave KDCs. On each of the slave KDCs issue the command 'kdb5_util stash' and provide the master key when prompted. Once that is completed, you can start the 'krb5kdc' daemon on each slave with the command '/usr/local/sbin/krb5kdc/.'
In Feburary 2016 16,
Before you begin setting up Kerberos on your system, you should know the name of your Kerberos, the hostname of the master and slave Key Distribution Centers (KDC) and how you are going to map your hostnames in the Kerberos realm. You will need to determine the ports that the KDCs and the database access (kadmin) services will use. You will also have to know how frequently the master and slave KDCs will fill the database.You will use the above information to configure the master KDC. The master KDC configuration files will be found at '/etc/krb5.conf' and '/usr/local/var/krb5kdc/kdc.conf' and can be edited in any text editor. The 'krb5.conf' file contains information about where to locate the KDCs and admin servers, as well as the host name mapping information. The 'kdc.conf' file contains the default information used when issuing Kerberos tickets. Open the '/etc/krb5.conf' and edit the 'login,' 'realms' and 'domain_realm' values so that they are correct for your system. Change the '/usr/local/var/krb5kdc/kdc.conf' so that it reflects the correct information for your KDC server.The next step is to create the database. Open a terminal and type the command 'kdb5_util.' You will be asked to provide a master key. This should be a string of letters, numbers and special characters similar to a password. This key will be stored in a stash file on the KDC's hard drive. If you would rather be prompted for the key whenever Kerberos starts, you can choose to not create the stash file.Finally, you will create the Access Control List (ACL) and add at least one administrator to it. The ACL is a user created text file that is called '/usr/local/var/krb5kdc/kadm5.acl.' This file should have the administrator listed in the form:
Kerberos_principal permissions [target_principal] [restrictions]
Once the ACL list is created, issue the command 'kadmin.local' and add each principal to the database. Start the Kerberos daemons with the command '/usr/local/sbin/krb5kdc; /usr/local/sbin/kadmin.'
Creating the Keytab File
The keytab file is used to decrypt the Kerberos tickets and determine whether the user should have access to the database. In order to create this file, type the command 'kadmin.local' again. This will provide you with a prompt where you will type the command: 'ktadd -k /usr/local/var/krb5kdc/kadm5.keytab kadmin/admin kadmin/changepw' to create the keytab file. Replace the section '/usr/local/var/krb5kdc/kadm5.keytab' with the keytab location that was specified in the '/usr/local/var/krb5kdc/kdc.conf' file. Type 'quit' to exit the 'kadmin' utility.
Configuring the Slave KDCs
To create the slave KDCs, you will issue the 'kadmin.local' command a third time. At the prompt, issue the command 'addprinc-randkey host/example.com' for the Master and each slave. Use the host name of each KDC in place of 'example.conf.' This will create host keys for each of the KDCs. Next, extract the keys on each of the slave KDCs by starting the 'kadmin' utility on each of the slaves and issuing the command 'ktadd host/MasterKDC.com.' Replace 'MasterKDC.com' with the host name of the master KDC.For the database to be propagated from the master KDC to the slave KDCs you will have to create a file called '/usr/local/var/krb5kdc/kpropd.acl.' This file must contain the principals for each of the KDCs in the form 'host/example.com.' Each principal should be placed on its own line. Next, edit the '/etc/inetd.conf' file on each of the KDCS and add the following lines:
krb5_prop stream tcp nowait root /usr/local/sbin/kpropd kpropd
eklogin stream tcp nowait root /usr/local/sbin/klogind klogind -k -c -eEdit the '/etc/services' file on each of the KDCs and add the following lines:
kerberos 88/udp kdc # Kerberos authentication (udp)
kerberos 88/tcp kdc # Kerberos authentication (tcp)
krb5_prop 754/tcp # Kerberos slave propagation
kerberos-adm 749/tcp # Kerberos 5 admin/changepw (tcp)
kerberos-adm 749/udp # Kerberos 5 admin/changepw (udp)
eklogin 2105/tcp # Kerberos encrypted rlogin
Propagating the Database
Propagating the database is done from the Master KDC. Issue the command '/usr/local/sbin/kdb5_util dump /usr/local/var/krb5kdc/slave_datatrans' to create a dump of the database. Next, issue the command ' /usr/local/sbin/kprop -f /usr/local/var/krb5kdc/slave_datatrans Slave-1.example.com' to manually propagate the database on each of the slaves. These steps will need to be completed on a regular basis. The easiest way to do this is to create as script and run the script as a cron job. The script should look like:!/bin/sh
kdclist = 'slave-1.example.com slave-2.example.com'/usr/local/sbin/kdb5_util 'dump
=> /usr/local/var/krb5kdc/slave_datatrans'for kdc in $kdclist
do
/usr/local/sbin/kprop -f /usr/local/var/krb5kdc/slave_datatrans $kdc
done
Of course, change the host names to reflect the values for your system.
Create Stash Files on the Slaves
The final step to setting up Kerberos is to create stash files on the slave KDCs. On each of the slave KDCs issue the command 'kdb5_util stash' and provide the master key when prompted. Once that is completed, you can start the 'krb5kdc' daemon on each slave with the command '/usr/local/sbin/krb5kdc/.'
In Feburary 2016 16,
Monday, 15 February 2016
How to Write to a Remote File in PHPIn Feburary 2016 15,
In Feburary 2016 15,
Open your PHP file in a text editor, such as Windows Notepad.
Connect to a remote FTP server. Open a file with the 'fopen(address, mode)' command. The mode needs to be set to 'w' for writing. For example, '$my_file = fopen ('ftp://ftp.myserver.com/myfile.txt', w);' will anonymously connect you to the ftp server and create a new file called 'myfile.txt' that you can write to. To use a non-anonymous account, change the address to use the format 'ftp://username:password@ftp.myserver.com/file'.
Write data to the file using the 'fwrite(handle, string);' command. For example, 'fwrite ($my_file, 'my text');'.
Close your connection once you are done writing to the file with the 'fclose(handle);' command. For example, 'fclose($my_file);'. Once executed, the new file will now have been written to and saved on the remote server.
Save the PHP file.
In Feburary 2016 15,
Open your PHP file in a text editor, such as Windows Notepad.
Connect to a remote FTP server. Open a file with the 'fopen(address, mode)' command. The mode needs to be set to 'w' for writing. For example, '$my_file = fopen ('ftp://ftp.myserver.com/myfile.txt', w);' will anonymously connect you to the ftp server and create a new file called 'myfile.txt' that you can write to. To use a non-anonymous account, change the address to use the format 'ftp://username:password@ftp.myserver.com/file'.
Write data to the file using the 'fwrite(handle, string);' command. For example, 'fwrite ($my_file, 'my text');'.
Close your connection once you are done writing to the file with the 'fclose(handle);' command. For example, 'fclose($my_file);'. Once executed, the new file will now have been written to and saved on the remote server.
Save the PHP file.
In Feburary 2016 15,
Saturday, 13 February 2016
How to Disable a Screen Saver Via a Command LineIn Feburary 2016 13,
In Feburary 2016 13,
Press the Windows logo key and 'R' simultaneously on your keyboard.
Type 'CMD' and press 'Enter.' This loads your Command Prompt.
Type the following command and press your 'Enter' key.REG ADD 'HKCU\Control Panel\Desktop' /v ScreenSaveActive /t REG_SZ /d 0 /fNote, do not copy and paste this command, as it will not work. To undo this change replace the '0' with a '1'.
Type 'Exit' and press 'Enter' after you see 'The operation completed successfully' message.
In Feburary 2016 13,
Press the Windows logo key and 'R' simultaneously on your keyboard.
Type 'CMD' and press 'Enter.' This loads your Command Prompt.
Type the following command and press your 'Enter' key.REG ADD 'HKCU\Control Panel\Desktop' /v ScreenSaveActive /t REG_SZ /d 0 /fNote, do not copy and paste this command, as it will not work. To undo this change replace the '0' with a '1'.
Type 'Exit' and press 'Enter' after you see 'The operation completed successfully' message.
In Feburary 2016 13,
Sunday, 7 February 2016
How to Configure VSFTPDIn Feburary 2016 07,
In Feburary 2016 07,
Open a Terminal Window. The terminal window will be found in the operating system's main 'Application' menu, under either 'System Tools' or 'Utilities.' You will be presented with a command prompt where you will type the following commands.
Type the command 'su' to switch to the root user.
Type the command 'gedit /etc/vsftpd/vsftpd.conf' to edit the main configuration file.
Make the appropriate changes. For example, if you do not want anonymous access set 'anonymous_enable=NO.' Also, if you want local users to be able to log in, remove the comment symbol (#) before 'local_enable.'
Save and close the file.
Type '/etc/initd/vsftpd restart' to restart the vsftpd daemon.
Type 'exit' to exit the root session.
In Feburary 2016 07,
Open a Terminal Window. The terminal window will be found in the operating system's main 'Application' menu, under either 'System Tools' or 'Utilities.' You will be presented with a command prompt where you will type the following commands.
Type the command 'su' to switch to the root user.
Type the command 'gedit /etc/vsftpd/vsftpd.conf' to edit the main configuration file.
Make the appropriate changes. For example, if you do not want anonymous access set 'anonymous_enable=NO.' Also, if you want local users to be able to log in, remove the comment symbol (#) before 'local_enable.'
Save and close the file.
Type '/etc/initd/vsftpd restart' to restart the vsftpd daemon.
Type 'exit' to exit the root session.
In Feburary 2016 07,
How to Test a Secure FTP Connection From a DOS PromptIn Feburary 2016 07,
In Feburary 2016 07,
Click Start. Click Run and type “cmd” (in Windows XP). In Windows Vista, type “cmd” in the Start Search box. This will open up the DOS prompt.
Create a test file by entering this command at the DOS prompt (without quotes): “dir > file.txt.”
Type the following command: “ftp [server name].” The server name should be the server or computer you are trying to connect to. For example, “ftp ftp.Microsoft.com.”
Enter your username/login and password when prompted.
Enter the following command: “put file.txt.” If your FTP connection has no errors, you will see a message that confirms that you are logged in.
Type “quit, to exit the FTP session.
Open the test file you created by typing: “edit file.txt.” The test file will show you the nature of any errors. The error may be at your end or on the server side.
In Feburary 2016 07,
Click Start. Click Run and type “cmd” (in Windows XP). In Windows Vista, type “cmd” in the Start Search box. This will open up the DOS prompt.
Create a test file by entering this command at the DOS prompt (without quotes): “dir > file.txt.”
Type the following command: “ftp [server name].” The server name should be the server or computer you are trying to connect to. For example, “ftp ftp.Microsoft.com.”
Enter your username/login and password when prompted.
Enter the following command: “put file.txt.” If your FTP connection has no errors, you will see a message that confirms that you are logged in.
Type “quit, to exit the FTP session.
Open the test file you created by typing: “edit file.txt.” The test file will show you the nature of any errors. The error may be at your end or on the server side.
In Feburary 2016 07,
How to Stop FTP TransferIn Feburary 2016 07,
In Feburary 2016 07,
Click the 'Start' button in Windows XP/Vista. Click 'Run' (only Windows XP). Then type 'cmd' and press 'Enter.' A new window with a black background (MS-DOS command prompt) will appear.
In Linux, right-click on Desktop and select 'open terminal' in the pop-up menu to open a new terminal.
Type 'ftp
' or ftp '
' followed by pressing 'Enter' (e.g., 'ftp blue.red.edu').
Type '
' (press 'Enter'); then type ' ' (press 'Enter') to access the ftp server. Note: An FTP command prompt ('ftp>') should appear.
Type either 'get
' or 'put
' followed by pressing 'Enter' to download or upload a file.
Press a 'Ctrl+C' key combination on the keyboard to stop the file transfer in progress. Note: Immediately after that, the FTP command prompt should appear.
Repeat Step 4 or type 'quit' and press 'Enter' to close the ftp connection.
In Feburary 2016 07,
Click the 'Start' button in Windows XP/Vista. Click 'Run' (only Windows XP). Then type 'cmd' and press 'Enter.' A new window with a black background (MS-DOS command prompt) will appear.
In Linux, right-click on Desktop and select 'open terminal' in the pop-up menu to open a new terminal.
Type 'ftp
' or ftp '
' followed by pressing 'Enter' (e.g., 'ftp blue.red.edu').
Type '
' (press 'Enter'); then type ' ' (press 'Enter') to access the ftp server. Note: An FTP command prompt ('ftp>') should appear.
Type either 'get
' or 'put
' followed by pressing 'Enter' to download or upload a file.
Press a 'Ctrl+C' key combination on the keyboard to stop the file transfer in progress. Note: Immediately after that, the FTP command prompt should appear.
Repeat Step 4 or type 'quit' and press 'Enter' to close the ftp connection.
In Feburary 2016 07,
Tuesday, 2 February 2016
How to Flush a Slow Query Log in MySQLIn Feburary 2016 02,
In Feburary 2016 02,
Connect to a remote MySQL server through SSH, or open a terminal window if you are located with the physical server.
Type “cd mysql-data-directory” at the command prompt, replacing mysql-data-directory with the path to the location of the mysql data files on your server. By default, the data directory is located in /var/lib/mysql .
Rename the current log files if you want to keep a copy for analysis, by typing the following at the command line.mv mysql.log mysql.old
mv mysql-slow.log mysql-slow.old
Flush the log files by typing at the command prompt:mysqladmin flush-logsMySQL closes any existing log files, and then reopens them as new files with the same names.
In Feburary 2016 02,
Connect to a remote MySQL server through SSH, or open a terminal window if you are located with the physical server.
Type “cd mysql-data-directory” at the command prompt, replacing mysql-data-directory with the path to the location of the mysql data files on your server. By default, the data directory is located in /var/lib/mysql .
Rename the current log files if you want to keep a copy for analysis, by typing the following at the command line.mv mysql.log mysql.old
mv mysql-slow.log mysql-slow.old
Flush the log files by typing at the command prompt:mysqladmin flush-logsMySQL closes any existing log files, and then reopens them as new files with the same names.
In Feburary 2016 02,
Subscribe to:
Posts (Atom)