A little trick that some Linux users like to implement to prevent accidental file deletion is via the use of an alias. Aliases are similar to variables and can either be set in a session or by placing the alias command in the .profile or .bash_profile file with a text editor.

By adding this alias the user will be prompted to confirm each file before it is deleted; otherwise Linux, unlike Microsoft Windows, will delete whatever files match the filename criteria without warning!

$ alias rm='rm -i'
$ touch touch1.fil touch2.fil touch3.fil
$ rm touch*
rm: remove regular empty file `touch1.fil'? y
rm: remove regular empty file `touch2.fil'? y
rm: remove regular empty file `touch3.fil'? y

Easy Linux CommandsFor more tips like this check out my book Easy Linux Commands, only $19.95 from Rampant TechPress.

Buy it now!


linux, unix, system administration, sysadmin, bash

Software by Rob has compiled a fantastic list of Nine Things Developers Want More Than Money and from my experience he’s hit the nail on the head!

Many of the developers I know have been programming since they were in junior high. Whether it was building text-based games on an Apple IIe or creating a high school football roster app in Visual Basic, it’s something they did for the challenge, for the love of learning new things and, oh yes, for the chicks. Ladies love a man who can speak BASIC to his Apple.

College graduates face a sad reality when they leave the protective womb of a university and have to get their first real job. Many of my friends found jobs paying around $25k out of school, and were amazed that the starting engineering and computer science salaries were nearly double that. But the majority of the engineers in my class didn’t become engineers for the money; we did it because it touched on a deep inner yearning to tinker and impress their friends. And did I mention the chicks?

Money is a motivating factor for most of us, but assuming comparable pay, what is it that makes some companies attract and retain developers while others churn through them like toilet paper?

Now, don’t get me wrong, you need to compensate your people appropriately as well, but ask your developers if they have any side projects and you’ll probably find that the best ones have some exciting side projects going on that they’re doing to learn something new, give back to the community or just to help someone out. This is the list of how you can tap into that energy at the office and get the most out of your developers.

via digg

management, project management, programming, information technology

In an interesting chain reaction Oracle and Microsoft have both recently committed to supporting Linux distributions.

Recently Oracle announced they will offer RedHat Linux support at very competitive rates. Beyond offering some healthy competition for RedHat support Oracle’s commitment also makes Oracle on Linux a single vendor solution for software support.

Microsoft was not far behind in announcing a partnership with Novel for Suse Linux sales support.

Only time will tell what this will do to the Unix/Unix-like OS market but it’s sure to shake things up in the short term.

linux, unix, microsoft, redhat, system administration, oracle, database administration, dba, sysadmin

Security Wire WeeklyEarlier this week I was invited to join Bill Brenner, a Senior News Writer at SearchSecurity.com to discuss Oracle security and the new CPU bulletin on the Security Wire Weekly podcast.

It is a fairly short interview, but if you want to hear some of my opinions on the current state of Oracle security, check it out.

You can also check out the list of all the Information Security podcasts from SearchSecurity.com.

podcast, interview, oracle, dba, security

If you’re like me you always intend to customize your UNIX or Linux prompt but never seem to find the time to look up the options and make the change. Well, to give you a jump start here’s an excerpt from my book Easy Linux Commands.

In order to eliminate the need to frequently issue the pwd command to determine the current working directory, many Linux users choose to display the working directory within the Linux command prompt. Some Linux administrators even provide this service for their users when they create their Linux accounts. If a user’s command prompt does not contain the working directory, the command prompt can be modified by changing the prompt string 1 (PS1) shell variable as demonstrated here:

$ PS1="[\u@\h \w]\\$ "
[tclark@appsvr /home/tclark]$

This example of setting the PS1 variable also adds the username (\u) and hostname (\h) to the prompt. This can be very useful if you frequently connect to different hosts and as different users.

In order to avoid having to modify the prompt at each login, the following line of code can be placed within the appropriate configuration file, such as .bash_profile for the bash shell, within the home directory. To do this you can use a text editor like vi to add the following line to your .bash_profile file:

export PS1="[\u@\h \w]\\$ "

Note: Files that begin with a period will not appear when you list the contents of a directory. To see these hidden files use the command ls –a

There are even more options which you can put into your PS1 prompt. While it’s nice to keep your prompt fairly short you may find some of the other options useful. The following table contains a list of values that can be displayed within the PS1 and/or PS2 prompt strings:

Symbol

Displayed Value

\!

History number of current command

\#

Command number of current command

\d

Current date

\h

Host name

\n

Newline

\s

Shell name

\t

Current time

\u

User name

\W

Current working directory

\w

Current working directory (full path)

As a bonus, here are a few of my favorite options for the PS1 prompt:

Prompt:
export PS1='\u@\h$ '
Result:
oracle@glonk$

Prompt:
export PS1='\w$ '
Result:
/usr/local$

Prompt:
export PS1='\d$ '
Result:
Mon Oct 30$

You may notice that all these have the dollar sign ($) in them which is typical of bash prompts. There is also a space after the dollar sign so you can easily tell where your prompt ends and your commands begin.

Easy Linux CommandsFor more tips like this check out my book Easy Linux Commands, only $19.95 from Rampant TechPress.

Buy it now!


linux, unix, system administration, sysadmin, bash, shell, unix shell, shell prompt

« Previous PageNext Page »