Simple Linux Command Reference
(Last modified: 18Feb2003)
This document (10056341) is provided subject to the disclaimer at the end of this document.
goal
Simple Linux Command Reference
fact
Novell ZENworks for Desktops 3.0
Novell ZENworks Imaging
fix
The following are simple Linux Commands for Reference when using the ZENworks for Desktops 3 Imaging Solution (See ZFD3 Image Engine Command-line parameters and Troubleshooting Tips for further information):
Linux - DOS - Description
cat /dir/file - type \dir\file - Concatenate or Show Contents
cp /here/file /there/file - copy \here\file \there\file - Copy File
ls - dir/w - Simple Directory
ls -al - dir - Detailed Directory List
mkdir /here/new - md \here\new or mkdir \here\new - Create new directory
mv /here/this /there/this - move \here\this \there\this - Move File
mv /here/this /here/that - ren \here\this \here\that - Rename File
pwd - cd - Show current directory
rm filename - del filename - Delete a file
type - - None - - Show the location of an executable file (if in your path)
runme.s - autoexec.bat - Boot file
Advanced Linux Command Reference
cat - Concatenate two or more files together, or display the contents of one or more files.
Example: cat /bin/lilo.s <-- Shows the contents of lilo.s
cat /bin/*.s <-- Shows the contents of all files ending with .s
cat /etc/rc.0 /etc/rc.6 | temp.txt <-- Puts the contents of the two files into temp.txt
DOS Equivalent: type
Help: cat --help
Location: /sbin/cat
cat /proc/meminfo - Show memory information
Example: cat /proc/meminfo <-- Show memory info
DOS Equivalent: mem and chkdsk
Help: - None -
Location: /proc/meminfo
cat /proc/version - Show version of linux kernel
Example: cat /proc/version <-- Shows version of kernel (Version 2.2.14 with ZfD3 Imaging)
DOS Equivalent: ver
Help: - None -
Location: /proc/version
cp - Copy files and directories
Example: cp file1.txt file2.txt <-- Copy file1.txt to file2.txt
cp -iv file1.txt file2.txt <-- Copy file1.txt to file2.txt (Verbose with confirmation on overwrites)
cp -R dir1 dir2 <-- Copy directory one and its contents to directory two
DOS Equivalent: copy and xcopy
Help: cp --help
Location: /sbin/cp
export - Export, store, and list variables
Example: export <-- Show currently defined system variables
DOS Equivalent: set
Help: - None -
Location: Built into shell
gzip - Compress and Uncompress files
Example: gzip file file.gz <-- Compress file to file.gz
gzip -d file.gz <-- Decompress file.gz to file
DOS Equivalent: pkzip and pkunzip
Help: gzip --help
Location: /sbin/gzip
ifconfig - Shows configuration of network devices
Example: ifconfig <-- Shows ethernet statistics about your NIC including the MAC address and its IP address.
DOS Equivalent: - None -
Help: ifconfig --help
Location: /sbin/ifconfig
ls - List files and directories
Example: ls <-- Simple directory listing
ls -a <-- Simple directory listing showing all files, including those starting with . (hidden files)
ls -al <-- Detailed directory listing showing all files
ls -alt <-- Detailed directory listing showing all files in date order (newest first)
DOS Equivalent: dir
Help: ls --help
Location: /sbin/ls
mkdir - Make Directory
Example: mkdir directory1 <-- Make Directory directory1
DOS Equivalent: mkdir
Help: mkdir --help
Location: /sbin/mkdir
more - Show file contents with page / line breaks
Example: more file.txt <-- Displays file.txt and pauses at each screen full
cat file1 file2 | more <-- Displays contents of file1 and file2 with pauses at each screen full
DOS Equivalent: more
Help: more --help
Location: /sbin/more
mv - Move or Rename files or directories
Example: mv file1 file2 <-- Rename file1 to file2
mv -i file1 file2 <-- Rename file1 to file2 (prompt for overwrite)
mv directory1/file1 directory2/file1 <-- Move file1 from directory1 to directory2
DOS Equivalent: move and rename
Help: mv --help
Location: /sbin/mv
pwd - Print Working Directory
Example: pwd
DOS Equivalent cd
Help: None
Location: Built into shell
rm - Remove files or directories
Example: rm file <-- Delete file.txt
rm -i file <-- Ask for approval for deletion
rm -r directory <-- Delete directory (be very careful)
rm -vr directory <-- Delete directory and show what is being deleted
DOS Equivalent: del, erase, rmdir, and deltree
Help: rm --help
Location: /sbin/rm
shutdown - Shutdown or Reboot the system
Example: shutdown -r now <-- Reboot the machine immediately
shutdown -h now <-- Shutdown the machine immediately
DOS Equivalent: Ctrl-Alt-Del
Help: shutdown --help
Location: /sbin/shutdown
tar - Tape archive utility (used to combine many files into one file)
Example: tar cvf file.tar file* <-- Create file.tar from all files starting with file
tar xvf file.tar <-- Extract the contents of file.tar into the current directory
DOS Equivalent: - None -
Help: tar --help
Location /sbin/tar
touch - Update the date and timestamp on a file. This makes a file look like it has been edited or created recently.
Example: touch /bin/runme.s
DOS Equivalent: - None -
Help: touch --help
Location: /sbin/touch
type - Show location of executable file (if in path)
Example: type shutdown (Gives the location of the shutdown program)
DOS Equivalent: - None -
Help: type --help
Location: Built into shell
chmod - Change Mode
Syntax: chmod nnn filename
Example: chmod 777 runme.s - sets all attributes to on
The numbers correspond to the hex value 111 111 111 in the attributes of a file when you do a ls -al and they show. So determine what rights you want and set the number accordingly.
document
Document Title: | Simple Linux Command Reference |
Document ID: | 10056341 |
Solution ID: | NOVL24336 |
Creation Date: | 28Aug2000 |
Modified Date: | 18Feb2003 |
Novell Product Class: | Management Products |
disclaimer
The Origin of this information may be internal or external to Novell. Novell makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Novell makes no explicit or implied claims to the validity of this information.
Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.