Linux Commands 1

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Linux Commands 1 as PDF for free.

More details

  • Words: 757
  • Pages: 4
First is man command …which gives you help for any command by syntax…. man ; Then comes to know where u r in … I mean in which folder(hey never call any thing a folder in Linux every thing is a directory) u r working on, for this the command is pwd (this is argument less) .. Then comes normal commands….to know who u r and to know path of any tool etc by commands who--- this is argument less which—for this u hve to type the argument for which path is to be displayed One important thing is there are two things in Linux 1. absolute path 2. relative path absolute path is the path specifying entire path including home directory also…. For example consider this command shown below Cd /home/export/anji/simulation/fulladder—(if u r in some directory in anji or in any other directory in some thing else) Relative path specifies the path for the respective folder without any named things…. For example consider below command Cd ../../synthesis---(If I am in fulladder folder of simulation in anji, and want to move to synthesis folder of anji) try this one. Then comes the basic commands cd---- is for change directory----where ever u type cd it will redirect u to ur home directory I think u know this one “.” Refers to the current directory and “..” refers to the parent directory. If u type “cd ..” then it will move you to the parent directoryi mean previous directory Basic Linux command structure is “ command [options] arguments” If any help required for any command then just type “command—help” then it will display u information about command

ls --- it displays the list of the files and directories in ur present directory as I said every command has options I mean just like constrains ……the options for this command are -a --- shows all files including hidden files -i ---- lists the inode for each file -l ---- uses a long listing format -r ---- produces output in reverse order -t ---- sorts output by modifications times for files -1 ---- lists one file per line Ex for using thes commands: ls –l -----for long listing files including all information ls –al ---- it displays as above including hidden filse ls –lrt ---- long listing most recently accessed files ls –li ---- long listing inode for each file FOR CREATING DIRECTORIES: mkdir [options] directory name options are : -P ----- to create intercening parent directories even if they donot exist FOR REMOVING DIRECTORIES: rm (keep in mind that the directory shoud be empty) for removing files rm -f --- this command does not promt before removing rm –i -- prompt before removing rm –r -- this command removes directories recursively….(*it prompts for each directory before removed) if u donot want it to prompt use rm –rf COPYING FILES: cp [options] source destination options are -f --- does not prompt before copying -i ---- prompts before copying -r ---- copies directories recursively

RENAMING AND MOVING FILES: mv [options] source destination options are: -f – same as for copy -i --- same as for copy Remember tghat ..ther is no command for renaming a file…we have to use mv command for that also USING WILDCARDS IN FILENAMES: They can be used to refer multiple files • * --- represents any string of characters • ? – represents a single character • [ ] – defines set of ranges TAB COMPLETION : U can type any one file name not even completely and then type tab u can see..possible files for that u typed ACCESSING PERMISSIONS FOR FILES Giving permissions for files using command line interface (CLI) chmod [options] mode options –R(capital) applies changes to directories recursively modes entities to which the change should apply u – for user g – for group o –other a – all whether permission should be granted or revoked is done by “+” or “-“ signs respectively examples for this type are chmod +RWX gives all permission to that file for user if u feel headache for this u can use octal representation of permissions

in which 4 – is for READ 2 – is for WRITE 1 – is for EXCUTE give it in order for example if u give chmod 755 it represnts the total permnissions for user and only read and execute permission for group and others 7 --- READ (4) + WRITE(2) + EXECUTE(1) 5 – READ(4) + EXECUTE(1)

Related Documents

Linux Commands 1
November 2019 17
Linux Commands 1
June 2020 12
Linux Commands
August 2019 49
Linux Commands
June 2020 31
Linux Commands
June 2020 15
Linux Commands
June 2020 24