Geeks Talk

Prepare for your Next Interview




Execute Unix Commands

This is a discussion on Execute Unix Commands within the Unix/Linux forums, part of the Operating Systems category; List and execute the following UNIX commands: (a)To change the password. (b)To search files in the current directory/subdirectory for lines that match a particular string pattern given. (...


Go Back   Geeks Talk > Operating Systems > Unix/Linux

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-28-2008
Junior Member
 
Join Date: Mar 2008
Location: Bangalore
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
vasanthakashyap is on a distinguished road
Execute Unix Commands

List and execute the following UNIX commands:
(a)To change the password.
(b)To search files in the current directory/subdirectory for lines that match a particular string pattern given.
(c)To print the first 5 lines of a file.
(d)To print the number of processes run by a particular user.
(e)To kill a process which is running in the background.
(f)To display the number of blank spaces in a given file.
(g)To sort alphabetically, a list of numbers stored in a data file in an ascending order.
(h)To convert the upper case letters to corresponding lower case letters in a text file.
(i)To count the number of users currently logged on.
(j)To display the calendar for a given month and year.
Reply With Quote
The Following User Says Thank You to vasanthakashyap For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 05-05-2008
Junior Member
 
Join Date: May 2008
Location: pune
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
asianhero.vamsi is on a distinguished road
Re: Execute Unix Commands

could answer some of your questions,

List and execute the following UNIX commands:
(a)To change the password. : Ans:- passwd
(c)To print the first 5 lines of a file. : Ans:- tail -5
(e)To kill a process which is running in the background. : Ans:- kill $! (this is to kill the last back ground process executed)
(i)To count the number of users currently logged on. : Ans:- who -a (will display the no. of users logged in - but it will not give us the count)
(j)To display the calendar for a given month and year. : Ans:- cal (this will display just the current months calendar) and if you want to display a specific month :- cal
Ex: cal 7 2007
Reply With Quote
  #3 (permalink)  
Old 05-08-2008
Junior Member
 
Join Date: May 2008
Location: Hyderabad
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
praneeth009 is on a distinguished road
Re: Execute Unix Commands

Quote:
Originally Posted by vasanthakashyap View Post
List and execute the following UNIX commands:
(a)To change the password.
(b)To search files in the current directory/subdirectory for lines that match a particular string pattern given.
(c)To print the first 5 lines of a file.
(d)To print the number of processes run by a particular user.
(e)To kill a process which is running in the background.
(f)To display the number of blank spaces in a given file.
(g)To sort alphabetically, a list of numbers stored in a data file in an ascending order.
(h)To convert the upper case letters to corresponding lower case letters in a text file.
(i)To count the number of users currently logged on.
(j)To display the calendar for a given month and year.

a)To change password use passwd or yppasswd
b)to locate a file a particularfile use "locate" or "find " --very useful
c)head or more
d)ps a | wc -l
e)kill pid (first find the pid of that process )
f)try this ---> cat filename | wc -w
g)use sort
j)cal monthname
Reply With Quote
Reply

  Geeks Talk > Operating Systems > Unix/Linux


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
RE: sleep commands archie42 Unix/Linux 0 01-12-2008 07:36 PM
Available Commands sripri Unix/Linux 4 01-04-2008 12:46 AM
101 Useful Run Commands Shivanna Geeks Lounge 2 12-31-2007 06:35 PM
Security commands in UNIX nancyphilips Unix/Linux 1 01-30-2007 07:08 PM
Difference in these UNIX commands RyanJames Unix/Linux 4 07-12-2006 03:00 PM


All times are GMT -4. The time now is 07:36 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved