Reputation
7,298
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
11 21
Newest
 Necromancer
Impact
~786k people reached

Sep
3
comment How to rename files using sed?
btw, if you liked my original answer and it worked for you, then please Accept it - there should be a tick under the up and down vote buttons.
Sep
3
answered How to rename files using sed?
Sep
3
comment Shell variables not working?
@Chris, there's no need to be scared of spaces in filenames, but there are plenty of reasons to be annoyed by them.
Sep
2
comment How to move file based on file name expression using shell script?
also, -r in GNU sed is an odd quirk. IMO, it should be -E to match the same option in GNU grep....but changing it now would break too many existing scripts that use -r.
Sep
2
comment How to move file based on file name expression using shell script?
-r in GNU sed and apparently -E in Mac's sed both tell sed to use extended regular expressions. The main difference between extended and basic regexps is that the some of the syntactically significant characters in regexp (){}+|?* are treated as literal strings in basic and have to be backslash-escaped to have their special meaning. In extended regexps, the situation is reversed and they have to be escaped to be treated as literal strings. I generally prefer to use extended because with less backslashes, the regexp is IMO more readable and less cryptic.
Sep
1
comment Linux CentOS 5 SSH User Permission Denied
actually, ignore what i said about your login scripts, it sounds like it's a permissions problem with /dev/null. make sure perms are 666. lmgtfy.com/?q=%22bash%3A+%2Fdev%2Fnull%3A+Permission+denied%22
Sep
1
comment How to move file based on file name expression using shell script?
BTW, you could easily make the script process multiple files at once by changing FileToMove="$1" to for FileToMove in "$@" ; do, and adding done to terminate the for-loop as the last line of the file.
Sep
1
answered How to move file based on file name expression using shell script?
Sep
1
comment Sort a file based on 1 column
+1 for sort -h. it's very useful, esp. for things like sorting du -h. according to the changelog, -h was added to GNU sort on 2009-05-26
Sep
1
comment Linux CentOS 5 SSH User Permission Denied
check your .profile, .bashrc, and/or .bash_profile scripts. that sounds like there might be a line like exec /dev/null (possibly intended as something like exec 2>/dev/null). Also, as root, check the perms on /dev/null, it should be owned by root:root, perms 666 (crw-rw-rw).
Sep
1
comment Linux CentOS 5 SSH User Permission Denied
from your answer to fayadlami, it sounds like you're logging in successfully. i'll comment more under f's answer.
Sep
1
answered How useful is Linux scripting?
Sep
1
answered degraded software raid boot
Sep
1
comment Segfault on a debian server
BTW, if you want more than 4GB you need to either run a 64-bit Debian, or a 32-bit debian with a 64-bit kernel or the 32-bit + PAE extensions kernel. A PAE kernel will recognise all 8GB but individual processes can only use a maximum of 4GB each.
Sep
1
comment Segfault on a debian server
ok, that indicates two things: 1. the kernel isn't detecting all available RAM when it boots, 2. the retail-soft program isn't checking whether a memory allocation succeeded, it's just assuming it did and seg-faulting when it tries to use it. Your question is now "how do i get the kernel to recognise all the memory?". You can add a mem= option to the kernel boot command line in /etc/default/grub
Sep
1
answered How to find and replace files contents that match a pattern?
Sep
1
comment Determining NIC designation from PCI address
i've added info about persistent naming by PCI address. see "3." in my answer.
Sep
1
revised Determining NIC designation from PCI address
added info about naming by PCI address
Aug
31
comment Check if script is started by cron, rather than invoked manually
@terdon: probably because ps is fairly badly documented (especially Linux's version which supports several different syntax styles) and the man page is even more dense and cryptic than most tools. I suspect most people don't even realise just how useful and versatile a tool ps can be.
Aug
31
revised Determining NIC designation from PCI address
added 59 characters in body