You are on page 1of 3

UNIX FAQS

by PenchalaRaju Yanamala

1. What is the use of ls -l command & what is the information it gives about user? A: - $ ls -l given the sorted file in long listing format. it gives the information such as type file!directory"# permissions. $iven to file# lin%s# owner# group user detail# date & time of modification etc. &. What is an 'nvironment (ariable? A: - 'nvironment variables are a set of dynamic named values that can affect the way running processes will behave on a computer. ). Write a grep command that selects the lines from a file that have e*actly three characters? A: - $ grep +...$ ,filename.. /he rm command removes lin%s to file. What does this mean? 0ow then is a file deleted from the file system? A: - rm never delete the lin%. 1nly file get removed from inde*. 2o it will not come when you will use ls command 3. how to change a normal file into hidden file A:- my filename .filename. 4. What is 5type5 command in 6789? What is the functionality?? A: - type :-aftp;< name :name ...< with no options# indicate how each name would be interpreted if used as a command name. =. how to find largest file? A:-8n the >irectry $ive....ls -ls?sort -nr?head -1that gives the largest file statistics... @. 0ow do you find which version and name of 6789 you are using at the command prompt? A:-Aour name -a in 0;-69 version name -s 1perating system name -r release of the

B. What is the command to change a fileCs creation time? Deans one file is created at the time 13:1B then time should br changed to 1.:1. A:-use touch command to change the date 1E. What will be the output of ls F!... A:-it will list the contents of home directory 11. $ive the command to display space usage on the 6789 file system. A:- df -% . 1&. What is use of sed command?

A:- sed is a stream editor for editing files from a script or from the command line 1&.how to remotely move a file ??? that mean how to move a file one machine to another machine ??? A:- Gy ftp 1). What is file system in uni*?? A:- ufs file system 1.. 0ow to setup >is% space as well as memory in solaris1E? A:- 1-GA using format command we can find the status of hard dis% format &-Hor %nowing the memory status Iprtconf grep Dem 13. Why we are using 6789 12 when we are doing the testing in our application? A:- 2ecurity# Dultitas%ing and bac%up etc.. 14. What is H87># $J'; and 2'> ? Kould you please give me the difference between all the three? Where we use this commnands? A:- H87> & $J'; Gasically H87> & $J'; are the 6789 commands shared through the H8L/'J2 .Where is 2'> 2/J'AD" is one of the main editor. H87> : Hind is an e*clusive command used to find files!folders are other information.and this is powerfull then windows. e* : I find !raMa -name she%ar -print output : raMa!she%ar $rep : /his is also one of the important command used toglobally searching the regular e*pression in the file .$'J; is grepping the information character by character. i.e" from file .e* 1" : I$J'; 5cat5 raMa &" : I$J'; -i 5cat5 raMa for case sensitive" &" : I$J'; -v 5cat5 raMa v represent negative " 16/;6/ :if we have an file raMa with data regarding cat we can clearly e*plain.Hinally 2'> 2/J'AD" 1=. what is the use of the hidden files? A:- the use of hidden file is my file is not view any another to use only to show myself 1@. 0ow many types of file in 6789? A:- total = files are there. 1. Jegular file: -":contains data in either te*t format orbinary format

&. >irectory file: d":contains entries of files ). H8H1 file: f":& communicate betn & processes running onsame system .. Gloc% special file: b":name given & special bloc%s ofhard dis% 3. 2ybolic file: l":its a lin% or pointer to alreadye*isting file 4. 2oc%et file: s":& communicate betn & processes running on different system in a networ% =. Kharacter special file: c":handles only characted formatted data eg.stdin# stdout# stderr 19. How will u execute a file in unix? IMP A:- >epending on the type of shell you can e*ecute a file in either of the ways 1" %sh ,filename&" sh ,filename8f the file already possess e*ecute bit set on it# then you can directly e*ecute the file with its name alone 1" ,filename1r if the file doesnCt have e*ecutable permissions than assign the same as chmod =33 ,filename-. after that e*ecute the same by using command .!,filename-. &E. 0ow do you create a file in 6789? $ cat -fruits.t*t Apple#orange# grapes +d ;ress controlNd" $ cat fruits.t*t Apple#orange#grapes. or

using touch & cat command. &1. Write a command to find all of the files which have been accessed within the last )E days. A:- find ! -type f -atime -)E - 7ovember.files & /his command will find all the files under root# which is 5!5# with file type is file. 5-atime -)E5 will give all the files accessed less than )E days ago. And the output will put into a file call 7ovember.files. &&. which command is used to stop a running process in uni*? A:- %ill -B pid its forcefully stop %ill the curent process

You might also like