Prepare for your Next Interview
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. (...
|
|||
|
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. |
| The Following User Says Thank You to vasanthakashyap For This Useful Post: | ||
| Sponsored Links |
|
|||
|
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 |
|
|||
|
Re: Execute Unix Commands
Quote:
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 |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| 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 |