Basic Unix Commands




Дата канвертавання26.04.2016
Памер14.18 Kb.
Basic Unix Commands: -

This section elaborates the basic UNIX commands, which will be commonly used by the students, while running Minix under Solaris.



      • mkdir: Creating a directory

    • Usage { mkdir [ -m mode ] [ -p ] dir ... }

      • e.g. mkdir minix  this creates a directory called “minix” in the working directory.

    • Usage { cd [ dirname] }

      • e.g. cd minix  changes the working directory to the “minix” directory.

      • ls: Finding out what files you have in a directory

    • Usage { ls [ -aAbcCdfFgilLmnopqrRstux1 ] [file ...] }

      • e.g. ls minix  list the contents of the directory. The user can specify any of the options depending on his choice.

    • Usage { cp -r | -R [ -fip ] source ... target }

      • e.g. cp san1.tex san2.tex  making the copy of san1.tex to san2.tex. The student can specify any of the options depending on his choice.

      • mv: Changing the name of a file

    • Usage { mv [ -fi ] source …. target }

      • e.g. mv san1.tex sanminix.tex  changing the name of san1.tex to sanminix.tex, again the student can use the options to specify the move.

    • Usage { rm [ -fiRr ] file }

      • e.g. rm san1.tex  removes san1.tex from the default-working directory.

      • rmdir : removing a directory

    • Usage { rmdir [ -ps ] dirname ...}

      • e.g. rmdir minix  removes the directory minix.

    • Usage { chmod [privilege mode] file/dir ……..}

      • e.g. chmod 777 san.tex  giving the full access permission to the particular file. The access privilege may entirely depend on the user and how the file / directory access is to be given.

      • chown: Change the ownership of the file

    • Usage { chown [ -fhR ] owner [ : group ] file ... }

      • e.g. chown -R -h owner[:group] file  to change ownership of all files in the hierarchy, including symbolic links but not the targets of the links.

      • uemacs 1: To use the uemacs editor in minix.

    • Usage { uemacs filename……}

      • e.g. uemacs san.tex  uemacs editor works only in minix. This command will open the file in the uemacs editor.

      • mined 2: Using mined editor in minix.

    • Usage { uemacs filename……}

      • e.g. mined san.tex  mined editor works only in minix. This command will open the file in the mined editor.

      • emacs: Using the emacs text editor

    • Usage { emacs filename……}

      • e.g. emacs minix.tex  emacs is a very popular editor. To edit any file just type emacs and file name. This command will open the file in the emacs editor.

      • vi 3 : Another popular text editor.

    • Usage { vi filename……}

      • e.g. vi san.tex  vi is one of the old editors. To edit the file just type vi and file name. The editor opens the file in vi editor. (Note:- Problems while using vi ?? – what happens when vi shutdowns abnormally ? – is it safe to use vi ?? )

      • pico: Another popular text editor.

    • Usage { uemacs filename……}

      • man: Manual pages.

    • Usage { man topic / command……}

      • e.g. man ls  manual pages of list command will be displayed. Students just need to type man and topic / command on which they need help. A full flourished manual with all the details on the topic / command will be displayed.

      • ps: Finding your processes status

    • Usage { ps [ -aAcdefjlLPy ] [ -g grplist ] [ -n namelist ] [ -o format ] ... [ -p proclist ] [ -s sidlist ] [ -t term ] [ -u uidlist ] [ -U uidlist ] [ -G gidlist ] }

      • e.g. ps – u sasankar  this will display the processes that are running for the user sasankar. The user can wish to terminate any process from the process list, by choosing their process id.

      • kill: Killing a process

    • Usage { kill pid……} e.g. kill 1900  kills the process with respect to the corresponding process id.




1 uemacs :- This is one of the editors that you will be using in minix. I have another link on the page that describes the commands and keys used in uemacs editor.

2 mined :- Yet another editor that will be used in minix. The link on editors will describe the commands and keys used in mined editor.

3 vi – vi is a very popular and old editor, I have a link on the editors that will help you to know the commonly used commands, while working with vi.


База данных защищена авторским правом ©shkola.of.by 2016
звярнуцца да адміністрацыі

    Галоўная старонка