Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
61 views

Thelinuxstuff - Blogspot.in 2011 12 Interview Linux Question Answers Part 4.HTML

The document discusses various Linux commands and concepts. It describes how to view free memory using /proc/meminfo, check if a port is open using netstat or nmap, and explains what a sticky bit is for directories in Linux. It also lists the different process states in Unix as running, waiting, stopped, and zombie. Common commands to list, stop, and find processes are ps, kill, and ps -ag. Methods to search for strings in files, directories, and recursively are also provided using grep along with commands to check sizes of user home directories and test httpd.conf for errors.

Uploaded by

Shitesh Sachan
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

Thelinuxstuff - Blogspot.in 2011 12 Interview Linux Question Answers Part 4.HTML

The document discusses various Linux commands and concepts. It describes how to view free memory using /proc/meminfo, check if a port is open using netstat or nmap, and explains what a sticky bit is for directories in Linux. It also lists the different process states in Unix as running, waiting, stopped, and zombie. Common commands to list, stop, and find processes are ps, kill, and ps -ag. Methods to search for strings in files, directories, and recursively are also provided using grep along with commands to check sizes of user home directories and test httpd.conf for errors.

Uploaded by

Shitesh Sachan
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Int erview Linux Quest ion & Answers-PART 4

How to see the f ree memory in Linux? /proc/meminf o / f ree

How you will see a port is opened or not? netstat an |grep LIST EN (or) nmap ipaddress What is Sticky bit ? If the sticky bit is set f or a directory, only the owner of the directory or the owner of a f ile can delete or rename a f ile within that directory T he sticky bit is an access-right f lag that can be assigned to f iles and directories on Unix systems. T he most common use of the sticky bit today is on directories, where, when set, items inside the directory can be renamed or deleted only by the item's owner, the directory's owner, or the superuser (Without the sticky bit set, a user with write and execute permissions f or the directory can rename or delete any f ile inside, regardless of the f ile's owner.)

What are the process states in Unix?

As a process executes it changes state according to its circumstances. Unix processes have the f ollowing states: Running : T he process is either running or it is ready to run . Waiting : T he process is waiting f or an event or f or a resource. Stopped : T he process has been stopped, usually by receiving a signal. Z ombie : T he process is dead but have not been removed f rom the process table.

How do you list currently running process? ps How do you stop a process? kill pid How do you f ind out about all running processes? ps -ag How do you search f or a string inside a given f ile? grep string f ilename How do you search f or a string inside a directory? grep string * How do you search f or a string in a directory with the subdirectories recursed? grep -r string *

How do you check the sizes of all users home directories (one command)? a. du -s df T he du command summarizes disk usage by directory. It recurses through all subdirectories and shows disk usage by each subdirectory with a f inal total at the end.

How do you check f or the httpd.conf consistency and any errors in it? apachectl conf igtest

You might also like