background preloader

*nix

Facebook Twitter

Vi Cheat Sheet. Md5deep and hashdeep. 8 Ways to Tweak and Configure Sudo on Ubuntu. Like most things on Linux, the sudo command is very configurable. You can have sudo run specific commands without asking for a password, restrict specific users to only approved commands, log commands run with sudo, and more. The sudo command’s behavior is controlled by the /etc/sudoers file on your system. This command must be edited with the visudo command, which performs syntax-checking to ensure you don’t accidentally break the file. Specify Users With Sudo Permissions The user account you create while installing Ubuntu is marked as an Administrator account, which means it can use sudo.

You can control user account types graphically from Ubuntu’s User Accounts tool. Make Sudo Forget Your Password By default, sudo remembers your password for 15 minutes after you type it. Sudo –k Always Ask For a Password If you’d rather be prompted each time you use sudo – for example, if other people regularly have access to your computer — you can disable the password-remembering behavior entirely. A Short IRC Primer. _ [ Note: At 93 K in size, this “short” help file is anything but short, and may take over a minute to load if you have a slow modem. Don’t access anything in the table of contents until the whole thing is loaded.

—Jolo ] _ Written by: Nicolas Pioch, (Nap on IRC) Text conversion by: Owe Rasmussen, (Sorg on IRC) HTML conversion & update by: Michelle A. Joseph Lo, (Jolo on IRC) email form Edition 1.2, January 1, 1997 Have you ever wanted to talk with other computer users in other parts of the world? Topics of discussion on IRC are varied, just like the topics of Usenet newsgroups are varied. IRC gained international fame during the late Persian Gulf War, when updates from around the world came across the wire, and most people on IRC gathered on a single channel to hear these reports. Getting started Clients and ServersHow to Behave on IRCPrivacy on IRC First StepsScreen and Keyboard activityLet’s go! 1.1 Clients and Servers There are two ways to enter IRC from a Unix system. 1.3 Privacy on IRC. Deleting tons of files in Linux (Argument list too long) | SteveKamerman.com. Deleting tons of files in Linux (Argument list too long) Quick Linux Tip: If you’re trying to delete a very large number of files at one time (I deleted a directory with 485,000+ today), you will probably run into this error: /bin/rm: Argument list too long.

The problem is that when you type something like “rm -rf *”, the “*” is replaced with a list of every matching file, like “rm -rf file1 file2 file3 file4″ and so on. There is a reletively small buffer of memory allocated to storing this list of arguments and if it is filled up, the shell will not execute the program. To get around this problem, a lot of people will use the find command to find every file and pass them one-by-one to the “rm” command like this: find . My problem is that I needed to delete 500,000 files and it was taking way too long. I stumbled upon a much faster way of deleting files – the “find” command has a “-delete” flag built right in!

You can also show the filenames as you’re deleting them: find . Permanent Link. Character encoding detection. Please insert medium [openSUSE-12.1-12.1-1.4] | ::::::: LINUX BLOG ::::::: How to edit and understand /etc/fstab. 10 Java Regular Expression Examples You Should Know. Regular expression is an art of the programing, it’s hard to debug , learn and understand, but the powerful features are still attract many developers to code regular expression.

Let’s explore the following 10 practical regular expression ~ enjoy :) 1. Username Regular Expression Pattern ^[a-z0-9_-]{3,15}$ ^ # Start of the line [a-z0-9_-] # Match characters and symbols in the list, a-z, 0-9 , underscore , hyphen {3,15} # Length at least 3 characters and maximum length of 15 $ # End of the line ==> See the explanation and example here 2. ((? ( # Start of group (? ==> See the explanation and example here 3. ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ ^ #start of the line # # must constains a "#" symbols ( # start of group #1 [A-Fa-f0-9]{6} # any strings in the list, with length of 6 | # ..or [A-Fa-f0-9]{3} # any strings in the list, with length of 3 ) # end of group #1 $ #end of the line ==> See the explanation and example here 4. ^[_A-Za-z0-9-]+(\\. ==> See the explanation and example here 5. ([^\s]+(\.(? 6. How do I change the hostname without a restart.