Posts Tagged ‘unix’

filter commands in unix

The grep command searches one or more files for lines containing a target and then prints all of the matching lines its finds. For example the following command prints all lines in the file “k2schools” that contains the word “schools”. $grep schools k2schools select your class in k2schools Using grep for queries: grep is used […]

file compression

There are 2 commands to zip the files in unix compress pack Compress: Syntax – $compress filename The result of the above command is filename.Z $compress -v filename The optional -v (for verbose) option files compress to report how much space it saved. For example, in the above case it is it reported the following: […]

Using umask to set permissions

The chmod command allows you to alter permissions on a file by file basis. The umask command allows you to do automatically when you create any file or directory. Every one has a default umask setting set up either by the system administrator or their .profile. Umask allows you to specify the permissions od all […]

File permissions / access modes

For directories, read permission allows user to list the contents of the directory, write permission allows users to create or remove files / directories inside that directory, and execute permission allows users to change this directory using the cd command or use it as part of a path name. Changing file permissions: chmod is the […]

Listing of files

  ls : it displays list of files and directories $ls -x : displays width wise $ls | pg : it displays list of files and directroies page wise $ls -x | pg: displays list of files and directories page wise and width wise $ls -a : displays files and directories including . And .. […]

creating and removing directories

mkdir command : to create a directory syntax : $mkdir directory name ex: $mkdir k2schools creating multiple directories $mkdir k2 k21 k23 … …. change directory Syntax : $cd directory name $cd k2schools $pwd /usr/k2schools/ $cd .. : to change to parent directory $cd\ : to change to root directory Remove directory $rm directory name […]

UNIX basic commands

1 $ logname Display the current user name 2 $pwd Displays the current working directory 3 $clear Clears the screen 4 $exit To logout form the current user 5 $date Displays the system date and time 6 $who am i It displays current username, terminal number, date and time at which you logged into the […]

UNIX file structure

The unix file system called as hirerachical file system. In fact whith in the UNIX system there is no limit to the number of files and directories you can create in directory that you own. File system of this type are often called tree structured file systems, because each directory allow you to branch off […]

UNIX file system

A file is the basic structure used to store information on the unix. Basically, a file is a sequence of bytes that is stored somewhere on storeage device. UNIX file system provides a logical method for organizing, storing, retriving, manipulating and information. A file can store manuscripts and other word processing documents, instructions or the […]

Architecture of UNIX

        Shell Shell reads user commands and interpret then as requests exec.. a program. Because of this shell is called a commad interpreter. Besides being a command interpreter, shell is also a programming language. As a programming language it permits you to control how and when commands are carried out. “Shell acts […]

Powered by k2schools