Posts

Showing posts with the label unix

Unix Fundamentals: File Manipulation

Image
Being an effective user of Unix likely means modifying, moving, renaming, searching for and deleting files and directories. NOTE: Windows has folders. Unix has directories. Functionally they are the same. Only the icons are different. Unix is meant to be a shared yet secure operating system. The security implementation for unix resolves around user, group and global permissions. Each file and directory has permissions attributes for owner, group, and global users. Types of Permissions Owner Access rights for the owner of the file or directory Group Access rights for the group owner of the file Global Access rights for everyone else Using the ‘ls –l’ command, we can see what the file permissions are for any given file or folder, like so: Let’s take a closer look at the access rights. -                ...

Unix Fundamentals: VI

VI is a barebone text editor. It’s older than most system admins are, so pay it some respect. VI has two modes, edit mode and read mode. Unless mapped properly (and it’s likely not) arrow keys are not available in edit mode. COMMANDS h,l,j,k Move cursor left, right,up,down i Enter edit mode dd(#) Delete # lines :wq or :x or ZZ Write, quit and exit :# Jump to line number # :q! Quit without saving dw Delete word yw Yank (copy) word yy Yank (copy) line p Put yanked text :w name.txt Write new file called name.txt ESC Enter read mode I keep this table printed and taped to the bottom of my monitor. It saves time. 

Unix Fundamentals: CRON

Image
CRON CRON is a unix utility which allows processes to be executed on a scheduled basis. It’s power is in it’s simplicity. Each user on the server has their own cron table; so user x can’t see the cron table of user y. More concretely, gswadmin doesn’t have access to oracle cron table and vice versa. Jobs and commands can be scheduled in the cron table using the crontab command. Entries into the cron table have three parts; scheduling, command, output redirection. The scheduling piece has allows jobs to be run up to the at any time increment between a minute and a year. An example of a cron table entry is as follows: * * * * * /oracle/bin/example.sh > /tmp/example.log 2>&1 ‘*’ is a wild card that indicates every increment. Here are some scheduling examples, 05 * * * * /oracle/bin/example.sh > output.log Runs every 5 minutes after every hour, every day of the month, every month, every day of the week. * 13 * * *...