From 425b7bd0280b49d8f0ad54248256f1680b31e548 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 17 Sep 2017 16:05:25 +0200 Subject: Strip indentation (to ease tracking later conversion to Markdown). --- pocketHelp.html | 384 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 192 insertions(+), 192 deletions(-) (limited to 'pocketHelp.html') diff --git a/pocketHelp.html b/pocketHelp.html index c442524..113c982 100644 --- a/pocketHelp.html +++ b/pocketHelp.html @@ -3,200 +3,200 @@ - - pocket wiki - Terminal commands - - - - - - - - - + +pocket wiki - Terminal commands + + + + + + + + + - -
-
-
-

pocket wikiTerminal commands

- - -
-
- -
-
-

navigate the file tree

- -

changing directory to dirname - cd dirname -

-

move up a directory in the tree - cd .. - dont forget you can drag a folder in from the finder to get a path to that directory -

-

go back to the last directory I was in - cd - -

-

where am I? (present working directory) - pwd -

-

list what's in this directory - ls -

-

now give me more information in the listing - ls -lah -

-

ssh to server - ssh user@domain.com -

-
-
- -
-
-

find & open

-

list all files recursively in subdomains - find . -

-

find all files with '.css' in the name - find . | grep .css -

-

find the string 'prose' in the contents of all the files in this directory - grep -r "prose" . -

-

open a file as if you had double clicked it in the finder (mac only) - open filename -

-

open the current directory in the finder - open . -

-

make a directory called dirname - mkdir dirname -

-

create a file called filename if it doesnt exist or update last modified date if it does - touch filename -

-
-
- -
-
-

move, remove & copy

-

move or rename a file or directory - mv oldname newname -

-

remove a file - rm filename -

-

remove a directory and all its contents. BE VERY CAREFUL! you could easily delete everything! - rm -rf dirname -

-

copy a file - cp oldfilename newfilename -

-

copy a directory and everything in it - cp -r olddirname newdirname -

-

securely copy a file to / on a remote server - scp file user@domain.com: - you can also copy a directory using scp -r -

- -
-
- -
-
-

subversion

-

check out a repository to the current directory - svn co URL . -

-

update local directory from repository - svn up -

- -

are there new or modified files? - svn status -

-

add new files to the repository - svn add filename -

-

remove a file from subversion - svn remove filename -

-

mark a previously conflicted file as resolved - svn resolved filename -

-

who changed what line number of this file - svn blame filename -

-

commit all changes in this directory - svn commit -m "commit msg" -

-
-
- -
-
-

subversion & download

-

is this directory checked out from svn? and where? - svn info -

-

show everything that has changed - svn diff -

-

show what has changed in one file - svn diff filename -

- -

open text editor in order to specify which files to ignore from svn - svn propedit svn:ignore . -

-

download a file to the current directory - wget URL -

-

show the contents of a file in the terminal - curl URL -

-
-
- -
-
-

help & information

-

run any command as root - sudo your-command-here -

-

get help for any command, eg svn - svn --help -

-

how long has this computer been on? - uptime -

-

what is the size of the current directory and all the contents - du -h -

-

cancel the command you were currently typing - ctrl + c -

-

go to the beginning of the line in the terminal - ctrl + a -

-

go to the end of the line in the terminal - ctrl + e -

-
-
- -
-
-
+ +
+
+
+

pocket wikiTerminal commands

+ + +
+
+ +
+
+

navigate the file tree

+ +

changing directory to dirname +cd dirname +

+

move up a directory in the tree +cd .. +dont forget you can drag a folder in from the finder to get a path to that directory +

+

go back to the last directory I was in +cd - +

+

where am I? (present working directory) +pwd +

+

list what's in this directory +ls +

+

now give me more information in the listing +ls -lah +

+

ssh to server +ssh user@domain.com +

+
+
+ +
+
+

find & open

+

list all files recursively in subdomains +find . +

+

find all files with '.css' in the name +find . | grep .css +

+

find the string 'prose' in the contents of all the files in this directory +grep -r "prose" . +

+

open a file as if you had double clicked it in the finder (mac only) +open filename +

+

open the current directory in the finder +open . +

+

make a directory called dirname +mkdir dirname +

+

create a file called filename if it doesnt exist or update last modified date if it does +touch filename +

+
+
+ +
+
+

move, remove & copy

+

move or rename a file or directory +mv oldname newname +

+

remove a file +rm filename +

+

remove a directory and all its contents. BE VERY CAREFUL! you could easily delete everything! +rm -rf dirname +

+

copy a file +cp oldfilename newfilename +

+

copy a directory and everything in it +cp -r olddirname newdirname +

+

securely copy a file to / on a remote server +scp file user@domain.com: +you can also copy a directory using scp -r +

+ +
+
+ +
+
+

subversion

+

check out a repository to the current directory +svn co URL . +

+

update local directory from repository +svn up +

+ +

are there new or modified files? +svn status +

+

add new files to the repository +svn add filename +

+

remove a file from subversion +svn remove filename +

+

mark a previously conflicted file as resolved +svn resolved filename +

+

who changed what line number of this file +svn blame filename +

+

commit all changes in this directory +svn commit -m "commit msg" +

+
+
+ +
+
+

subversion & download

+

is this directory checked out from svn? and where? +svn info +

+

show everything that has changed +svn diff +

+

show what has changed in one file +svn diff filename +

+ +

open text editor in order to specify which files to ignore from svn +svn propedit svn:ignore . +

+

download a file to the current directory +wget URL +

+

show the contents of a file in the terminal +curl URL +

+
+
+ +
+
+

help & information

+

run any command as root +sudo your-command-here +

+

get help for any command, eg svn +svn --help +

+

how long has this computer been on? +uptime +

+

what is the size of the current directory and all the contents +du -h +

+

cancel the command you were currently typing +ctrl + c +

+

go to the beginning of the line in the terminal +ctrl + a +

+

go to the end of the line in the terminal +ctrl + e +

+
+
+ +
+
+
-- cgit v1.2.3