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

Unix Commands

To schedule tasks or jobs in cron, use the crontab command along with a filename specifying what to do. The crontab -l command views scheduled jobs and crontab -e edits them. The syntax uses stars to specify the minute, hour, day of month, month, and day of week. Nohup runs jobs in the background even if the shell is terminated. Halt stops all processes and reboots the system, while sudo halt shuts down. Find searches for files from the root directory. Vi editor commands include :w to save, :q to quit, and :q! to force quit. Gedit is a graphical text editor.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

Unix Commands

To schedule tasks or jobs in cron, use the crontab command along with a filename specifying what to do. The crontab -l command views scheduled jobs and crontab -e edits them. The syntax uses stars to specify the minute, hour, day of month, month, and day of week. Nohup runs jobs in the background even if the shell is terminated. Halt stops all processes and reboots the system, while sudo halt shuts down. Find searches for files from the root directory. Vi editor commands include :w to save, :q to quit, and :q! to force quit. Gedit is a graphical text editor.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

To schedule a Task or Job Command crontab < filename > In filename we mention what need to be done Crontab l : To view

ew all the scheduled jobs running in server Crontab -e: to edit the Scheduled jobs on the server Syntax to schedule a particular job * * * * * crontab <path of file name> 1st Star : minute (0-59) 2nd Star : hour (2-24) rd 3 Star : Day of the month (1-31) 4th Star : Month(1-12) 1-Jan 5th Star : Day of the week (0-6) 0-sun,1-mon -----------------------------------------------------------------------Nohup runs the job even shell is terminated Nohup grep : nohup command before another command you intend to run as a background process. To Terminate Nohup use kill -----------------------------------------------------------------------Halt : stop all process Reboot: stops all process and reboot Sudo halt : shutdown FIND find / -name fname : start from the root directory look for the file called fname find/ -name *fname* : start from the root directory look for the file containing the string fname.

Vi- editor Commands -----------------------------------------------------------------------:w - will save , :q- will exit the editor, :q!- Force exit :w Filename - save the text to new file name :n moves to line n of the File N dd- Delete N lines, N dw Delete N words yy- Copy p paste x-delete character -----------------------------------------------------------------------h-left, l-right, k-up, j-down -----------------------------------------------------------------------/string search string , :1, $s/word/another word : replace word with another word -----------------------------------------------------------------------Gedit graphical text editor FILE : 1g: to start of the file g: end of the file Move -----------------------------------------------------------------------a: insert text after cursor i: insert text before cursor A: append text to the end of current line I: insert text to the start of the current line adduser accountname: Create a new user call accountname passwd accountname: Give accountname a new password su: Log in as superuser from current login exit: Stop being superuser and revert to normal user

You might also like