Recent Changes - Search:

Research


edit SideBar


LinuxCommands

Linux commands

taken from http://www.ss64.com/bash/

  • cat filename
  • ls -als filename
  • ps –aux | grep xxx % processes running on Linksys box
  • ln –sf existing_file new_filename % sf = forced symbolic link
  • chmod o+r –R mp3 % changes owner+read to all files,
  • chmod 755 –R * % all can execute files…..owner-group-other files % using 4=r+2=w=1=x
  • tar -cz -f archive_name file1 file2 % -x extract, -Z compress, -z gzip/gunzip
  • free % provides memory overview
  • disk commands
    • du -d 1 /opt/www /opt/share % shows disk usage of 1 directory depth
    • df % shows how much space is used per mounted point

extra shells in /opt/bin ===

  • date +m provides yymmdd output, used for "backup file"
 #!/bin/sh
 DATE=`date +m%d`
 echo "Current date is $DATE."
 NARG=$#
 echo "you have $NARG arguments"
 if test $# -eq 0
 then
echo "no arguments given, use:"
  echo "cpd filename"
  echo "will perform: cp filename filename.$DATE"
  exit 1
 fi
 echo "copy filename "
 if test -f $1
 then
  echo "cp $1 $1.$DATE"
  cp $1 $1.$DATE
 else
  echo "$1 is not a file - abort"
  exit 1
 fi

vi commands

vi is the editor in the Linksys box, taken from: http://www.cpqlinux.com/vi.html

  • vi filename % start editor
  • :wq % save and exit
  • :q! % don’t save and exit
  • /searchterm % search in file for ”searchterm”
  • x % delete character
  • i % insert , end with ESC
  • a % append, end with ESC
  • /word % search for “word”, n for next
  • 99return % jump to line 99:wq
  • :s/findstring/replacestring/g % replaces strings globally
  • :args *.txt % load all .txt files

Change multiple files from DokuWiki to PMWiki

works fine with Notepad light

DokuWikiPMWikicomment
**'''bold
//''% italics
__**% global indent
**% ** indent
=====!first line header
====!!second line header
===!!!3rd header
==!!!!4th header

Useful web pages

php: http://www.galileocomputing.de/openbook/php4/kapc.htm

Redirection of Web pages

<html>
<head>
<meta http-equiv="REFRESH" content="1; URL=http://www.unik.no/~josef/pmwiki/index.php">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>
<h3><font color="#CC0000">You will automatically be redirected to www.unik.no/~josef/pmwiki/index.php in 1 seconds. If your browser doesn't automatically load, click <a href="http://www.unik.no/~josef/pmwiki/index.php">HERE</a>.
</body>
<html>

<html>

 <head>
 <meta http-equiv="REFRESH" content="1; URL=http://www.unik.no/~josef/pmwiki/index.php">
 </head>
 <body bgcolor="#FFFFFF" text="#000000">
 <p> 
 <h3><font color="#CC0000">You will automatically be redirected to www.unik.no/~josef/pmwiki/index.php in 1 seconds. If your browser doesn't automatically load, click <a href="http://www.unik.no/~josef/pmwiki/index.php">HERE</a>.
 </body>
 <html>
Edit - History - Print - Recent Changes - Search
Page last modified on August 01, 2005, at 05:08 PM EST