To start a new screen session, simply type the word "screen" and hit enter. It is preferred that you name your screen session, by instead using "screen -t name".
To "detach" from a screen session, type "Control+A", then "D".
To terminate a screen session, type "exit" and hit enter.
To list currently running screen sessions, type "screen -ls" and hit enter.
To "reattach" a screen session, type "screen -r [name of socket]" and hit enter.
"[name of socket]" is one of the sockets listed from the "screen -ls" command.
To scroll back through console output within a screen session: ctrl-a (release) then type [ Use the up and down arrows. To escape this mode (copy mode) hit esc
This is my cheat sheet if I have to look back for an answer for problems. You're welcome to add or comment the answer.
Wednesday, September 21, 2011
Monday, September 12, 2011
Showing tables only in mysql
To show only tables and dump to a txt, use the command
# mysqlshow database_name > export.txt
# mysqlshow database_name > export.txt
Monday, August 15, 2011
Quick shortcut for moodle in config.php
$CFG->enablestats = false; //to disable statistics
$CFG->themedir = $CFG->dataroot.'/theme'; //for adding theme dir
$CFG->themedir = $CFG->dataroot.'/theme'; //for adding theme dir
Tuesday, August 9, 2011
Installing Office2007 with protected windows files error
If you run into error while installing Office2007 with description protected windows files problem, then here is the fix.
Copy fpault.dll file on the original xp cd,
hiding in I386\FP40EXT.CAB
to c:\program files\common files\microsoft shared\web server extensions\40\bin
Copy fpault.dll file on the original xp cd,
hiding in I386\FP40EXT.CAB
to c:\program files\common files\microsoft shared\web server extensions\40\bin
Friday, August 5, 2011
ls command
Options:
-l list files one line at a time
-A lists all the contents of a directory except for current directory and parent directory
-B ignore backups
-c sort by change time
-d lists file and directory names without contents
-e lists all times in full
-f list without sorting
-k list file size in kilobytes
-l list files in long format
-L list files by symbolic link
-m list files horizontally separate by commas
-r sort files in reverse order
-R list files recursively
-S list files by size, biggest first
-u sort files by the last time they were accessed
-x print in columns, sorted horizontally
-X sort files alphabetically by file extension
-l list files one line at a time
-A lists all the contents of a directory except for current directory and parent directory
-B ignore backups
-c sort by change time
-d lists file and directory names without contents
-e lists all times in full
-f list without sorting
-k list file size in kilobytes
-l list files in long format
-L list files by symbolic link
-m list files horizontally separate by commas
-r sort files in reverse order
-R list files recursively
-S list files by size, biggest first
-u sort files by the last time they were accessed
-x print in columns, sorted horizontally
-X sort files alphabetically by file extension
Tuesday, August 2, 2011
Sort directory in linux
To sort directory based on size, here is the command
du -hs * | sort +0n
To view only the Gb,
du -hs * | sort +0n | grep Gb
du -hs * | sort +0n
To view only the Gb,
du -hs * | sort +0n | grep Gb
Subscribe to:
Posts (Atom)