Documente Academic
Documente Profesional
Documente Cultură
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. Given to file, links, owner, group
user detail, date & time of modification etc.
A: - Environment variables are a set of dynamic named values that can affect the
way running processes will behave on a computer.
3. Write a grep command that selects the lines from a file that have exactly three
characters?
4. The rm command removes links to file. What does this mean? How then is a
file deleted from the file system?
A: - rm never delete the link. Only file get removed from index. So it will not come
when you will use ls command
A: - type [-aftpP] name [name ...] with no options, indicate how each name would
be interpreted if used as a command name.
A:-In the Directry Give....ls -ls|sort -nr|head -1that gives the largest file statistics...
8. How do you find which version and name of UNIX you are using at the
command prompt?
9. What is the command to change a file's creation time? Means one file is
created at the time 15:19 then time should br changed to 14:14
11. Give the command to display space usage on the UNIX file system.
A:- df -k .
12.how to remotely move a file ??? that mean how to move a file one machine to
another machine ???
A:- By ftp
A:- 1-BY using format command we can find the status of hard disk format
15. Why we are using UNIX OS when we are doing the testing in our application?
16. What is FIND, GREP and SED ? Could you please give me the difference
between all the three? Where we use this commnands?
Basically FIND & GREP are the UNIX commands shared through the
FILTERS .Where is SED (STREAM) is one of the main editor.
output : raja/shekar
Grep : This is also one of the important command used toglobally searching the
regular expression in the file .GERP is grepping the information character by
character.(i.e) from file .ex 1) : #GREP "cat" raja
OUTPUT :if we have an file raja with data regarding cat we can clearly
explain.Finally SED (STREAM)
A:- the use of hidden file is my file is not view any another to use only to show
myself
A:- Depending on the type of shell you can execute a file in either of the ways
1) ksh <filename>
2) sh <filename>
If the file already possess execute bit set on it, then you can directly execute the
file with its name alone
1) <filename>
Or if the file doesn't have executable permissions than assign the same as
chmod 755 <filename>. after that execute the same by using command
./<filename>.
$ cat >fruits.txt
Apple,orange, grapes
^d (Press control+d)
$ cat fruits.txt
Apple,orange,grapes. or
21. Write a command to find all of the files which have been accessed within the
last 30 days.
A:- find / -type f -atime -30 > November.files & This command will find all the files
under root, which is "/", with file type is file. "-atime -30" will give all the files
accessed less than 30 days ago. And the output will put into a file call
November.files.
A:- kill -9 pid its forcefully stop kill the curent process