Command line

From Bytesized Wiki

(Difference between revisions)
Jump to: navigation, search
m (Protected "Command line" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
Line 1: Line 1:
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://aduratutuz.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]=
 +
----
 +
=[http://aduratutuz.co.cc CLICK HERE]=
 +
----
 +
</div>
Some of the most common commands are shown on the page below
Some of the most common commands are shown on the page below
Line 56: Line 64:
*Important! The command needs to be all in one line, and quotes must be used around the folder name if it contains spaces.
*Important! The command needs to be all in one line, and quotes must be used around the folder name if it contains spaces.
-
*For example, if I wanted to make a torrent for What.cd from the data in the "VA – Summer Trance 2009" directory I already have on my server at ~/torrents/completed/VA - Summer Trance 2009, you would navigate to the parent directory to make your torrent. Type to navigate to it:
+
*For example, if I wanted to make a torrent for What.cd from the data in the &quot;VA – Summer Trance 2009&quot; directory I already have on my server at ~/torrents/completed/VA - Summer Trance 2009, you would navigate to the parent directory to make your torrent. Type to navigate to it:
  cd ~/torrents/completed
  cd ~/torrents/completed
Line 62: Line 70:
Then type the following command:
Then type the following command:
-
  mktorrent -v -p -a http://tracker.what.cd:34000/xxxXXXxxx/announce -o VA-Summer_Trance_2009.torrent "VA - Summer Trance 2009"
+
  mktorrent -v -p -a http://tracker.what.cd:34000/xxxXXXxxx/announce -o VA-Summer_Trance_2009.torrent &quot;VA - Summer Trance 2009&quot;
Please note that you must use quotes if the target dir name contains spaces.
Please note that you must use quotes if the target dir name contains spaces.
Line 72: Line 80:
-r is for recursive -f is for force removal
-r is for recursive -f is for force removal
If the folder name has a space in it, use quotes around the folder name:
If the folder name has a space in it, use quotes around the folder name:
-
  rm -rf "some folder name"
+
  rm -rf &quot;some folder name&quot;
==Find files==
==Find files==
Line 83: Line 91:
*To find files by extension, use this command:
*To find files by extension, use this command:
-
  find ~ -name "*.[given_extension]"
+
  find ~ -name &quot;*.[given_extension]&quot;
*For example:
*For example:
-
  find ~ -name "*.jpg"
+
  find ~ -name &quot;*.jpg&quot;
will show you all files, with the .jpg extension.
will show you all files, with the .jpg extension.

Revision as of 01:58, 24 November 2010



Contents

This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page


CLICK HERE


Some of the most common commands are shown on the page below

SSH access

To ssh in to your slice you need terminal or terminal emulator.

Linux

Open up your terminal and type:

ssh [email protected]

(with servername being your actual server name). You will get screen similar to this

ssh.png

Type yes, then type your password and voila you are connected to your slice via secure shell (ssh).

Windows

  • Download putty.
  • When you start it, you should get window like this:

puttydesktop.png

In Hostname box type:

servername.bytesized-hosting.com

(with servername being your actual server name)

puttys.png

Click open, you should get windows like this:

puttyq.png

Click yes. Next, type your username at login: and password at password: and you`re in. (where password is your application password from your dashboard) You will NOT see your password.

Space Check

Best way of checking your disk usage is checking your dashboard. However, if you believe that disk usage is not shown correctly, [SSH] to your slice or open up your [ VNC] start lxterminal and type:

du ~/ -s --si

-s is for summarize, instead of each folder size listed separately —si is for use powers of 1000, not 1024

  • You can create an alias for the above command (or any command) in your .bash_aliases file, which is located in your ~ (home) directory. Just edit the .bash_aliases file, and add this line to it:
alias space='du ~/ -s --si'

You can name it whatever you want – I happen to call it space, because it’s easy for me to remember.

Creating a torrent

  • To make a .torrent file using command line, execute this command:
mktorrent -v -p -a http://tracker.url -o filename.torrent folder_name

-v is for verbose -p is for private, as in not DTH or PeerExchange -a is for tracker url follows -o is for output file name follows

  • Important! The command needs to be all in one line, and quotes must be used around the folder name if it contains spaces.
  • For example, if I wanted to make a torrent for What.cd from the data in the "VA – Summer Trance 2009" directory I already have on my server at ~/torrents/completed/VA - Summer Trance 2009, you would navigate to the parent directory to make your torrent. Type to navigate to it:
cd ~/torrents/completed

Then type the following command:

mktorrent -v -p -a http://tracker.what.cd:34000/xxxXXXxxx/announce -o VA-Summer_Trance_2009.torrent "VA - Summer Trance 2009"

Please note that you must use quotes if the target dir name contains spaces.

Remove a folder

  • To remove a whole folder, with files still in it, execute this command:
rm -rf foldername/

-r is for recursive -f is for force removal If the folder name has a space in it, use quotes around the folder name:

rm -rf "some folder name"

Find files

  • To find specific files by name in your home folder, use this command:
find ~ -name [name_of_file]

~ stands for your home folder; same as $HOME or /home/hd/username

  • For example:
find ~ -name bluray

will find all files with the word bluray in the name. You can use wildcards like * to search a partial name, like blu*

  • To find files by extension, use this command:
find ~ -name "*.[given_extension]"
  • For example:
find ~ -name "*.jpg"

will show you all files, with the .jpg extension.

Find IP Address of your seedbox

  • To find the IP address for your server, use this command:
hostname -i

-i is for IP addresses for the host name

Extracting files on your slice

  • To extract files from a rar archive on the server, use this command:
unrar e SomeMovieChunkFile.rar

-e is for Extract files to current directory

  • To list files inside rar archive without extracting them:
unrar l file.rar

-l is for list (not a number ‘one’)

  • To extract files with full path, type this command:
unrar x file.rar
  • To test integrity of archive file, type this command:
unrar t file.rar

-t is for testing integrity of archive

Stream video from your box

  • Using putty or terminal at your home computer type:
ssh  username:[email protected] cat /path/to/video/file/videofile.mkv | mplayer -cache 32768 -


Flushing DNS cache

  • In terminal, type:
service nscd restart

This command will restart nscd and effectively flush the DNS cache of your box, useful for when trackers move IPs and your client keeps trying to reach the old IP. This will allow your box to get the new DNS entry for your trackers, after you run this command, update tracker on your stalled torrents and it they should run as usual.

Personal tools