Показаны сообщения с ярлыком commands. Показать все сообщения
Показаны сообщения с ярлыком commands. Показать все сообщения

28 янв. 2014 г.

Basic FTP commands

?
to request help or information about the FTP commands
ascii
to set the mode of file transfer to ASCII (this is the default and transmits seven bits per character)
binary
to set the mode of file transfer to binary (the binary mode transmits all eight bits per byte and thus provides less chance of a transmission error and must be used to transmit files other than ASCII files)
bye
to exit the FTP environment (same as quit)
cd
to change directory on the remote machine
close
to terminate a connection with another computer
close brubeck
closes the current FTP connection with brubeck, but still leaves you within the FTP environment.
delete
to delete (remove) a file in the current remote directory (same as rm in UNIX)
get
to copy one file from the remote machine to the local machine
get ABC DEF
copies file ABC in the current remote directory to (or on top of) a file named DEF in your current local directory.
get ABC
copies file ABC in the current remote directory to (or on top of) a file with the same name, ABC, in your current local directory.
help
to request a list of all available FTP commands
lcd
to change directory on your local machine (same as UNIX cd)
ls
to list the names of the files in the current remote directory
mkdir
to make a new directory within the current remote directory
mget
to copy multiple files from the remote machine to the local machine; you are prompted for a y/n answer before transferring each file
mget *
copies all the files in the current remote directory to your current local directory, using the same filenames. Notice the use of the wild card character, *.
mput
to copy multiple files from the local machine to the remote machine; you are prompted for a y/n answer before transferring each file
open
to open a connection with another computer
open brubeck
opens a new FTP connection with brubeck; you must enter a username and password for a brubeckaccount (unless it is to be an anonymous connection).
put
to copy one file from the local machine to the remote machine
pwd
to find out the pathname of the current directory on the remote machine
quit
to exit the FTP environment (same as bye)
rmdir
to to remove (delete) a directory in the current remote directory

4 февр. 2012 г.

ERROR "sudo: sorry, you must have a tty to run sudo"

The reason for this is an update along the way with sudo locked it down further by adding the below line to /etc/sudoers configuration file. 1 Defaults requiretty To allow a remote script to login and run a command via sudo simply comment out that line as shown below. 1   # Commented out so remote script can login and run a command without a tty
2   # Defaults requiretty
If requiretty is set, sudo will only run when the user is logged in to a real tty. This will disallow things like 'rsh somehost sudo ls' since rsh does not allocate a tty; because it is not possible to turn off echo when there is no tty present.

HDD test speed

# hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 3134 MB in 2.00 seconds = 1569.12 MB/sec
Timing buffered disk reads: 242 MB in 3.00 seconds = 80.55 MB/sec

# hdparm -tT /dev/sda
/dev/hda:
Timing cached reads: 176 MB in 2.00 seconds = 87.87 MB/sec
Timing buffered disk reads: 86 MB in 3.05 seconds = 28.16 MB/sec

# hdparm -tT /dev/sda
/dev/hdb:
Timing cached reads: 844 MB in 2.00 seconds = 421.50 MB/sec
Timing buffered disk reads: 116 MB in 3.01 seconds = 38.55 MB/sec