Back to FAQ

Type only what's in bold. Files downloaded from this site are files we have had success with and tested with. Updated versions can be obtained from the accompanied download sites. Any scripts written are written for the specific files on this site


Command Help Download full LINUX command help document
  1. How do I find a file ... ?
  2. How do I check if a process is running ... ?
  3. How do I check routes on a box ... ?
  4. How do I check files in a directory ... ?
  5. How do I change ownership of files ... ?
  6. How do I add a remote printer (print server) on Linux ... ?

How do I find a file ... ?

At your Linux prompt type the following command

find / -name FILENAME -print

FILENAME = the file you are looking for
The / is to search the whole drive.

If you want to search only the etc directory then use.
find /etc -name FILENAME -print

If you want to use wild cards then the *FILENAME should be in "*FILENAME"
find / -name "*FILENAME" -print

Back to Top

How do I check if a process is running ... ?

if you want to check if squid is running type the following command
ps -ef | grep squid
Substitute squid with the other processes you are looking for. e.g. smtpd or httpd

Back to Top

How do I check routes on the box ... ?

If you want to check what route exist on the server type the following command
netstat -rn

Back to Top

How do I check files in a directory ... ?

To check for files type the following command
ls
To check for files with all details type the following command
ls -l

Back to Top

How do I change ownership of files ... ?

Change to the directory where the file is. of which you want to change the ownership.

chown NEWOWNER FILENAME

FILENAME = The filename you want to change ownership of.
NEWOWNER = The new owner of the file.
e.g. For this exercise FILENAME = hosts and NEWOWNER = root

Type the following command
cd /etc
chown root hosts

Back to Top

How do I add a remote printer (print server) on Linux ... ?

Adding a remote printer (print server) you need to use the lpadmin command.

The lpadmin options are listed below

lpadmin 
    -p networkprinter
    -v /dev/null 
    -T PS 
    -A write 
    -i /usr/lib/lp/model/netstandard
    -o dest=10.0.0.10
    -o protocol=bsd
    -o nobanner
    -I postscript
    -u allow:all

A simple command to add a print server

lpadmin -p printername -o dest=IP Address -v dest=/dev/null

the following must be done after adding this printer

accept printername
enable printername

To test if the printer is working

lp -dprintername /etc/hosts

Make sure that the printername and IP Address is listed in the /etc/hosts file

Back to Top