Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX

Similar documents
Computer Systems and Architecture

UNIX Quick Reference

IMPORTANT: Logging Off LOGGING IN

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Computer Systems and Architecture

Linux Nuts and Bolts

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;

Chapter-3. Introduction to Unix: Fundamental Commands

Linux Reference Card - Command Summary

Introduction to UNIX command-line

Introduction to Linux

Stop all processes and then reboot - same as above startx. Log in as superuser from current login exit

Useful Unix Commands Cheat Sheet

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

Unix Tools / Command Line

Introduction to UNIX/Linux

Linux Command Line Primer. By: Scott Marshall

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Lecture # 2 Introduction to UNIX (Part 2)

Common UNIX Utilities Alphabetical List

Introduction to UNIX Command Line

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

M.C.A. (Sem.-lll) (CBCS) Examination November CCA-3003 Operating System and LinuxlUnix programming

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

Introduction to the UNIX command line

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

hash Remember the full pathname of a name argument head Output the first part of file(s) history Command History hostname Print or set system name

CS 460 Linux Tutorial

Introduction to UNIX command-line II

National University of Computer and Emerging Sciences Operating System Lab - 02 Lab Manual

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Lab 2: Linux/Unix shell

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

An Introduction to Unix

Basic Shell Commands

UNIX. Basic UNIX Command

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

Exercise 1: Basic Tools

CS Fundamentals of Programming II Fall Very Basic UNIX

Introduction to Unix: Fundamental Commands

Files

Set 1 MCQ Which command is used to sort the lines of data in a file in reverse order A) sort B) sh C) st D) sort -r

Perl and R Scripting for Biologists

UNIX Quick Reference

Outline. Structure of a UNIX command

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

AN INTRODUCTION TO UNIX

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

Getting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers

Introduction to Linux Organizing Files

ACS Unix (Winter Term, ) Page 92

CS197U: A Hands on Introduction to Unix

CSCE 212H, Spring 2008, Matthews Lab Assignment 1: Representation of Integers Assigned: January 17 Due: January 22

2) clear :- It clears the terminal screen. Syntax :- clear

SIEMENS UserAdmin Workshop TELEPERM XP Version 4 Chapter 1

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

Working with Basic Linux. Daniel Balagué

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.

CS4350 Unix Programming. Outline

MTU Computer Structure

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

Bash command line for Linux. adduser Add a user to the system. addgroup Add a group to the system. Create an alias

Introduction to Linux

Practical Session 0 Introduction to Linux

INTRODUCTION TO LINUX

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

LOG ON TO LINUX AND LOG OFF

Unix L555. Dept. of Linguistics, Indiana University Fall Unix. Unix. Directories. Files. Useful Commands. Permissions. tar.

1Z Oracle Linux Fundamentals (Oracle Partner Network) Exam Summary Syllabus Questions

Introduction to remote command line Linux. Research Computing Team University of Birmingham

System Administration

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Systems Programming/ C and UNIX

Unix System Architecture, File System, and Shell Commands

TJU Syllabus for Linux Fundamentals and Applications

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Getting your department account

Introduction to Linux

Lab 1 Introduction to UNIX and C

Lab Working with Linux Command Line

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater)

Hitchhiker s Guide to VLSI Design with Cadence & Synopsys

Part 1: Basic Commands/U3li3es

UNIX Basics. UNIX Basics CIS 218 Oakton Community College

COMS 6100 Class Notes 3

Utilities. September 8, 2015

Unix Workshop Aug 2014

Physics REU Unix Tutorial

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Introduction to Linux

Basic Linux Commands. Srihari Kalgi M.Tech, CSE (KReSIT), IIT Bombay. May 5, 2009

Crash Course in Unix. For more info check out the Unix man pages -orhttp:// -or- Unix in a Nutshell (an O Reilly book).

Linux 系统介绍 (I) 袁华

Week 2 Lecture 3. Unix

Self-test Linux/UNIX fundamentals

Using Linux as a Virtual Machine

Introduction To Linux. Rob Thomas - ACRC

Transcription:

Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX 15th Jan. 2000 / 3:55 am Part 1: Working with files and rights ------------------------------------- cp <source> <dest> mv <source> <dest> cd <directory> pwd mkdir <directory> rm <directory> rm -R <directory> rm <file> chmod usermoderights df --- Copies the source file to dest --- Moves source to dest (if a directory, else it renames source to dest) --- Changes the current directory --- Shows the current directory --- Creates a directory --- Deletes a directory, if empty --- Deletes a whole directory with subdirectories (like DELTREE <directory>) --- Deletes a file --- 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 --- 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

nl <file> sort <file> strings <file> file wc <file> --- Shows the lines of the file numbered --- Shows the lines of the file in sorted order --- Shows only the readable strings of a --- Shows lines, words, bytes of a file file <file> --- Gives information about a file touch <file> -a -m -c -t MMDDhhmmCCYY --- Changes the timestamp of a file -a (Change Access-time) -m (Change Modification-time) -c (Don't create files, that don't exist) pico [file] script <file> between this command lpr <file> lprm <file> sudo <file> when reported --- An easy to use ASCII-Editor. --- Copies the text, that is entered and the "exit"-command in <file> --- Prints a file --- Removes file from Printing Queue --- Executes file with SuperUser-Rights (Only user is in SUID-List, else it will be to root) Part 2: Working with archives ----------------------------- tar -cvf <archive.tar> <files> the files (uncompressed) tar -xpvf <archive.tar> <files> archive tar -tf <archive.tar> less --- Creates <archive.tar> and stores in this archive --- Extracts the files from the --- Shows the contents of an archive gzip <file> have to them. tar -zxf <file.tar.gz> --- Compresses the <file> gzip can only compress one file, so you'll archive the files with tar and then gzip This will give you a file.tar.gz --- Decompresses and Extracts the files tar -M -cvf /dev/fd0h1440 <files> --- Creates a Multi-Volume-Archive (for floppy discs) tar -M -xpvf /dev/fd0h1440 --- Extracts a Multi-Volume-Archive Part 3: Working with filesystems -------------------------------- Formatting a Floppy Disc.

Step 1 -- Format the disc fdformat /dev/fd0h1440 Step 2 -- Create a Filesystem on the disc mkfs -t <fs> -c /dev/fd0h1440 <fs> stands for the filesystem. This can be ext2/minix/msdos (for floppys normal is minix) To use a floppy disc or a cd-rom, you'll have to mount them before. mount <device> <directory> Floppy: mount /dev/fd0 /floppy would be normal, CD-ROM: mount /dev/hdc /cdrom I think.) (you can use any directory, but floppy Part 4: Working in Networks --------------------------- Connect to a remote machine, and execute programs on it. telnet remote.host.org machine in the uname -a w is running finger information about passwd write <user> [<tty>] terminal, you can <user> must chsh --- Connect to a remote machine You can then execute programs on the remote terminal. --- Gives information about the current system --- Shows who is currently logged in and what he --- Shows who is logged in. With "finger <user>" you can get more specific users --- Change User Password --- Write a message to <user>. If <user> is logged on more than one specify it in <tty>. To answer you, the also start "write" --- Changes the login shell Part 5: Programming -------------------

cc -o <Output file> <Source file> --- compiles the Source file into Output file gcc -o <Output file> <Source file> --- same gcc -o <Output file> -l<libname> --- links the library <libname> to the file The C functions are declared in manual 3 ==> man 3 <function> Part 6: Doing jobs in the background ------------------------------------ If you add an & at the end of a command, it will start in the background. Exmpl: fdformat /dev/fd0h1440 & ps -a kill <PID> kill -9 <PID> --- Shows all current processes --- End process --- Forces the process to end You can stop the processes on two ways and make them to jobs. CTRL-C CTRL-Z bg <job> fg <job> kill <%job> jobs --- Stop process --- Stop process temporarily --- Brings a job into background --- Brings a job into foreground --- End job --- Shows all current jobs Part 7: Escape Sequences ------------------------ \a Bell \b backspace \f feed \n linefeed \r carriage return \t tab horizontal \v tab vertical Ending ------ This text should just provide some basic skills, so that you can start using UN*X. I know it isn't declared very much, but i like short tables, being able to lookup a certain command. If you need to know more specific switches you can always consult the manuals with: man <command>. If you are interested in more help or have ideas which should be inserted contact me at razor99@gmx.de. If there is anyone interested in this, I will perhaps rewrite this doc and write more to the commands. And I hope you excuse my style, but it is now 5:05 in the morning and I'm really tired...

RAZOR