BTO120 Linux Notes for Test 1

BTO120 Linux Notes for Test 1 - BTO120 Linux Notes for Test...

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: BTO120 Linux Notes for Test 1 Some Commands pwd will show your current directory cd is used to change current directory, eg. cd directory-name ls- lists information about files and directories o ls -a- all files (including hidden) o ls -l- long form, gives more information about files o ls -d- gives information about the directory itself, not contained files o these options can be mixed and matched, eg. ls -ld cal- displays a calendar of the current month o cal 1995- displays calendar for specified year o cal 3 1995- displays calendar for specified month of specified year date- gives date and time who , w- information about users logged on to system o who am i , whoami- information about your session BTO120 - Operating Systems for Programmers - UNIX Lecture 2 - Common Commands; Simple Filter Commands Common Commands touch- creates a new file, or updates stats on an existing file mkdir- to create directories o mkdir -p- to create a directory & any parent directories not already existing rmdir- to delete empty directories, eg. rmdir directory-list mv existing-file new-file - to rename or move files & directories cp source-file destination-file - to copy files (careful, overwrites destination with no warning) o cp -R - to copy directories including files and subdirectories rm- to delete files, eg. rm file-list o rm -r - to delete directories including files and subdirectories o rm -ir- to delete directories including files and subdirectories, with prompt to confirm removal cat filename- display contents of file more or less- displays file contents one page at a time o <space bar> - will go to next page o b - will go to previous page o /string - will search for string within document being viewed o q - will quit file filename- gives info about the contents of the file find- to find files matching specified characteristics o find . -name file* - lists pathname of any filenames beginning with "file", from the current directory and any subdirectories o find . -size +50k - lists pathname of any files larger than 50 kb, from the current directory and any subdirectories o find . -user alice -empty -delete- deletes empty files owned by user "alice" o find . -mmin -5 - lists files modified less than 5 minutes ago man command - online manual (or help) for command, uses more to display information o man -k keyword- eg. man -k calendar- searches through man sections for keyword o similar commands: apropos , whatis , info diff file1 file2 - displays differences between 2 files o similar commands: cmp and comm echo text or $variable (eg. $USER) stty- determine and set terminal characteristics o stty -a - will show all terminal capabilities o stty -g - will show all terminal capabilities in machine- readable form can be used to reset terminal characteristics in scripts o stty -echo - disables echoing of typed characters...
View Full Document

This note was uploaded on 03/08/2012 for the course BSD 120 taught by Professor L.czegal during the Spring '12 term at Seneca.

Page1 / 21

BTO120 Linux Notes for Test 1 - BTO120 Linux Notes for Test...

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

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