The Essential QNX Commands
cd -- change directory  
    examples: 
    cd 
      changes to your root directory (ie /home/stealth).
    cd /home/stealth/data 
      changes the working directory to /home/stealth/data
    cd .. 
      moves back one directory
cp -- copy a file or directory  
cp [options]... source_file target_file 
    examples: 
    cp stealth.sol backup/stealth.sol.bak 
      copies stealth.sol to the directory backup with the name stealth.sol.bak
    cp *.log data 
      copies all .log files to the directory data.  If the directory data does not exist, all of the files will be copied to a single file called data.
ls -- lists a directory  
ls [options] [file ...] 
    important switches 
    -l -- long list.  Shows file attributes and sizes 
    -D -- shows only directories
     example: 
     ls -l stealth* 
       a long listing of all files and directories starting with stealth (output follows)

      Brw-rw-r--  1 stealth   user      2072 Dec 10 20:01 stealth.log 
      -rw-rw-r--  1 stealth   user      3953 Dec 03 20:29 stealth.pcm 
      -rw-rw-r--  1 stealth   user      6152 Jul 10 17:24 stealth.rtg 
      -rw-rw-r--  1 stealth   user      6152 Jul 10 17:24 stealth.rtg.bak 
      -rw-rw-r--  1 stealth   user       912 Dec 04 15:17 stealth.sft 
      -rw-rw-r--  1 stealth   user      9644 Aug 13 00:25 stealth.sol 
      -rw-rw-r--  1 stealth   user      2665 Dec 05 21:56 stealth.tma 
      -rwxrwxr-x  1 stealth   user     61501 Dec 05 21:57 stealthalgo 
      -rwxrwxr-x  1 stealth   user     60594 Dec 05 21:57 stealthclt 
      -rwsrwx--x  1 root      root     55127 Dec 04 15:17 stealthcol 
      -rwxrwxr-x  1 stealth   user      4508 Dec 05 21:55 stealthcol_wd 
      -rwxrwxr-x  1 stealth   user     66102 Dec 04 15:17 stealthdisp 
      -rwxrwxr-x  1 stealth   user      4157 Aug 29 21:17 stealthdoit 
      -rwsrwx--x  1 root      root     57202 Dec 05 21:56 stealthsrvr
man -- manual page  
    man is a program that displays the manual page for a command using an html viewer called lynx.  Not all QNX commands are documented such that man works!
    example: 
    man ls 

    see also: use

mkdir -- makes a directory  
mkdir [-p] [-m mode] dir... 
     example: 
     mkdir test 
       makes a directory called test
mv -- move or rename a file or directory  
mv [options]  source_file target_file 
    examples: 
    mv stealth.sol stealth.sol.bak 
      renames stealth.sol to stealth.sol.bak
    mv stealth.sol backup 
      renames stealth.sol to backup UNLESS backup is a directory in which it moves steatlh.sol to backup/stealth.sol
ps -- show process status 
    example: 
    ps 
      used to see what processes are running similar to sin
pwd -- print working directory
    The pwd utility writes the pathname of the current working directory to the standard output.  This is a very usefully utility when you are "lost" and don't know which directory you are in.

    example:
    pwd

      if you are in the /home/stealth/src dirctory pwd will return /home/stealth/src
rm -- remove files or directories 
    Once a file or directory is removed it is deleted permentantly!
    important switches: 
    -f -- force removal (no prompting) 
    -r -- remove directory and its contents 

    examples: 
    rm data* 

      remove all files in current directory starting with the letters "data"
    rm -r data* 
      remove all files AND all directories starting with the letters "data"
sin -- system info  
    examples: 
    sin 
      shows all running processes
    sin irqs 
      shows which irqs are used and by which process
use -- gives help on a QNX command 
    example: 
    use ls 
      shows all the options and brief description of the command ls
    see also: man
Back to the data acquisition table of contents
Return to CATS index

 

 

Return to CATS index