Unix_Commands - Some useful UNIX Commands written down by...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
for newbies to get a start in UNIX 15th Jan. 2000 / 3:55 am Part 1: Working with files and rights ------------------------------------- cp <source> <dest> --- Copies the source file to dest mv <source> <dest> --- Moves source to dest (if a directory, else it renames source to dest) cd <directory> --- Changes the current directory pwd --- Shows the current directory mkdir <directory> --- Creates a directory rm <directory> --- Deletes a directory, if empty rm -R <directory> --- Deletes a whole directory with subdirectories (like DELTREE <directory>) rm <file> --- Deletes a file chmod userMODErights --- Changes the mode of a file user=(u)ser (current user) (g)roup (group of current user) (o)ther (all, except user&group) (a)ll (all :) ) MODE=(+) add rights (-) remove rights rights=(r)eadable (w)ritable e(x)ecutable df --- Shows free disk space find / -name "<file>" --- Searches the whole tree for a file (> DIR <FILE> /S) whereis <file> --- Searches the path for a file grep -l "<Text>" <files> --- Shows all files, which contain the given <Text> cmp <file1> <file2> --- Compares <file1> with <file2> diff <file1> <file2> --- Compares <file1> with <file2> and show the difference between them head <file> --- Shows the first 10 lines of the file tail <file> --- Shows the last 10 lines of the file
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Unix_Commands - Some useful UNIX Commands written down by...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online