Basic Unix Commands. Listing files and directories ● ls:command is used to list the files and ● directories in present working directory ● ls command.

Slides:



Advertisements
Similar presentations
The Unix File System. What are the three parts of every file on a Unix filesystem? And where is each stored? Filename - stored in directories Inode -
Advertisements

©Colin Jamison 2004 Introduction to Linux Colin Jamison.
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 27 th, 2009 Essential Unix Commands.
CS 497C – Introduction to UNIX Lecture 12: - The File System Chin-Chih Chang
UNIX Chapter 00 A “ Quick Start ” into UNIX Operating System Mr. Mohammad Smirat.
T UTORIAL OF U NIX C OMMAND & SHELL SCRIPT S 5027 Professor: Dr. Shu-Ching Chen TA: Samira Pouyanfar Spring 2015.
Unix Basics. Systems Programming: Unix Basics 2 Unix Basics  Unix directories  Important Unix file commands  File and Directory Access Rights through.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Systems Programming Concepts
Learning basic Unix command IT 325 operating system.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
The file structure and related utilities CS240 Computer Science II.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
CHAPTER 1 UNIX FOR NONPROGRAMMERS By U ğ ur Halıcı.
Linux Directory Navigation. File & Directory Commands This is a minimal list of Unix commands that you must know for file management: ls (list) mkdir.
Working with Files Chapter 5. Display a Calendar Display a calendar for a specific month – cal Display a calendar for a specific year – cal 2000.
1 Lecture 2 Working with Files and Directories COP 3344 Introduction to UNIX.
Unix Basics Chapter 4.
File Permissions. What are the three categories of users that apply to file permissions? Owner (or user) Group All others (public, world, others)
The UNIX development environment CS 400/600 – Data Structures.
Working with Linux Lab 1 1. Login and logout Account – username & password – Note: Linux is case-sensitive Administrator: username = root Logout: exit,
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. UNIX Commands cal – will print a calendar.
L&T Infotech1 UNIX – Getting Started - Aneesh Ramani.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Introduction to UNIX Geraint Vaughan. What is UNIX? Command-line operating system (not point- and click) Designed for ‘experts’ Lots of different variants.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
Lecture One. Objective: Provide description of the Command-Line Editor of Linux operating system. Enable students to understand the practical side of.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
Λειτουργικά Συστήματα – Lab2 Γιάννης Πετράκης. Directory Navigation and Control  The Unix file system is set up like a tree branching out from the root.
EGEE-III INFSO-RI Enabling Grids for E-sciencE Apr. 25, Grid Computing Hands On Training for Users Faculty of Sciences, University.
1 Lecture 2 Working with Files and Directories COP 3353 Introduction to UNIX.
Isecur1ty training center Presented by : Eng. Mohammad Khreesha.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
Linux Stuff Last Update Copyright 2014 Kenneth M. Chipps Ph.D. 1.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
Unix Fundamentals CS 127. File navigation cd - change directory cd /var/log cd /etc/apache2 cd ~/Desktop ~ is a shortcut for the home directory.
ICE UNIX TUTORIAL. File System Commands cd – change directory cd – change directory ls – list contents ls – list contents rm – remove/delete rm – remove/delete.
Learning basic Unix command It 325 operating system.
File Management commands cat Cat command cat cal.txt cat command displays the contents of a file here cal.txt on screen (or standard out).
1 Linux Commands. 2 Path You specify a file or directory by its path name:  the full, or absolute, path name or the one relative to a location. The full.
UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Tutorial of Unix Command & shell scriptS 5027
Getting started with CentOS Linux
Commands Basic syntax of shell commands UNIX or shell commands have a basic structure command -options target command comes first (such as cd or ls) any.
Linux Commands Workout 1
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
CS314 – Section 5 Recitation 1
Eric Shook Department of Geography Kent State University
Ubuntu Working in Terminal
Tutorial of Unix Command & shell scriptS 5027
Tutorial of Unix Command & shell scriptS 5027
Operating Systems and Using Linux
Web Programming Essentials:
Tutorial of Unix Command & shell scriptS 5027
A Brief Overview of Unix
The Unix File System.
Getting started with CentOS Linux
Tutorial Unix Command & Makefile CIS 5027
The Linux Command Line Chapter 4
Module 6 Working with Files and Directories
Lab 2: Terminal Basics.
January 26th, 2004 Class Meeting 2
The Linux Command Line Chapter 4
Presentation transcript:

Basic Unix Commands

Listing files and directories ● ls:command is used to list the files and ● directories in present working directory ● ls command is most used command ● syntax: ls Lists the files and directories in present working directory

ls ● Display One File Per Line Using ls -a ● To show hidden files ● means. Files in unix

ls ● Display All Information About Files/Directories Using ls -l ● To show long listing information about the file/directory. ● $ ls -l ● -rw-r srinivas team-dev Jun 13 15:27 mthesaur.txt.gz ● 1st Character – File Type: ● - normal file ● d directory

ls ● Field 1 – File Permissions ● Field 2 – Number of links ● Field 3 – Owner ● Field 4 – Group ● Field 5 – Size ● Field 6 – Last modified date & time ● Field 7 – File name

Display File Size in Human Readable Format Using ls -lh ● Use ls -lh (h stands for human readable form), to display file size in easy to read format. i.e M for MB, K for KB, G for GB. ● $ ls -lh ● -rw-r srinivas team-dev 8.9M Jun 12 15:27 arch- linux.txt.gz

cd ● cd command is used to change the directories ● options: cd. Current directory ● cd.. back to one directory ● cd../../ go back two directories.

Pathnames ● Use the pwd command to print the working directory (the current directory you are in) ● $ pwd ● /home ● $ cd /home/rich/www ● $ pwd ● /home/rich/www ● $

Creating Directories ● mkdir : command is used to create directories ● The syntax for the mkdir command is: ● mkdir directoryname

Copying Files ● cp: command is used to copy files one one directory to another directory ● syntax : cp source destination

Moving Files ● The mv command is used to move a file from one directory to another directory ● we can also use this command to renaming a file ● Syntax: mv fromsource todestination ● mv a.txt b.txt ● The above command changes file name “a to b”

Removing Files and directories ● rm : this command is used to remove files and directories ● syntax: rm [option] file/directory ● the -rf option can be used to remove the directories and sub directories. ● rm -rf directoryname

Displaying the contents of a file on the screen ● In unix we have multiple commands to display the content of a file on the screen some of them are ● 1.more ● 2.cat ● 3.vi editor

more ● The more command displays the content of a file on the screen ● syntax: more filename ● We can't modify the content of a file using more command this is used just for display file content only

cat command Using cat command we can read and modify the content of a file. We can use this command to concatenate files 1.reading a file syntax:cat filename 2.appending text to a file syntax: cat >> filename 3.Over writing file content syntax: cat > filename

Questions???

Thank You