|
Useful Commands
for Virtual Server Administration
System Commands
- man: Online help system in Linux man
command gives a info on the command
- pwd: Print working directory with all the
branches between that directory and the root.
- mkdir: Make directory command
- cd: Change directory [cd
directory] or return to the root [cd]. cd .. moves
back one directory level towards root.
- ls: List files. -l a
gives complete list w/ dot files. ls -ogh list files with
o=no group names, g=no owners, and h=readable file size.
- touch: Create an empty file [touch
filename]
- more: View the contents of a file [more
filename]. less is often better for
this.
- cp: Copy files. [cp file1
file2] copies a file named file1 to a file named
file2
- mv: Move and rename. [mv this
that} renames file this to have the name
that. If done w/ directory, it moves and renames the
file. [mv this /data/that] changes the name of
this to that and moves it to the directory /data.
[mv this /data] moves the file this to the directory
/data
- rm: Removes files [rm this]
deletes the file this. -r removes directories.
[rm -r /data] removes the directory /data. rm
-r is recursive and removes everything from the directory on down
the file tree including all files in directories and subdirectories
beneath the directory being removed.
- nano: Starts the nano editor
FTP Commands from Terminal - FTP
jvlone.com: this starts a telnet session with jvlone.com
FTP
will ask for a username and password. It will give the ftp>
prompt.
- ls: lists the files in the
current directory of the remote system
- pwd: displays the current
directory on the remote system
- cd: changes the current directory on the
remote system
- lcd: changes the current directory on the
local machine that you are connecting from
- get: initiates a download to retrieve a
file from the current directory of the remote system, and places it in
the current directory on the local machine that you are connecting
from
- prompt: toggles whether there's a prompt for each
file transfer with an mget * or mput * command
- put: puts or sends a file from the current
directory of the machine that you are connecting from (the local
machine) and places it in
the current directory of the remote system
- mget mput: This puts or gets multiple files to or from the
local machine to the remote machine. mget * transfers all the files
in the remote machine's current directory to the current directory of
the local machine.
- ascii: sets the FTP transfer mode to
ASCII. This mode sends files as ASCII text (7-bit). Its primary use
is to transfer text files from machines with different line endings
and correct the line ending. A text file from DOS with CR-LF will
have the CR stripped off in an ASCII transfer to a Linux/Unix
machine. Most files of any type will usually transfer as Binary.
ASCII transfers will corrupt any
files that are not text (jpg, pdf, doc, bin).
- binary or bi: sets the FTP transfer mode
to binary. Most files will transfer fine in this mode, whether text
or binary.
- quit or bye: closes the connection with
the remote system and exits the FTP program
|