Archive of ‘Tutorials’ category

Moving directories between filesystems.

Moving directories between filesystems.Quick way to move an entire tree of files from one disk to anotherĀ 

(cd /source/directory && tar cf – . ) | (cd /dest/directory && tar xvfp -)

[ Change from cd /source/directory; tar….etc. to prevent possibility of trashing directory in case of disaster.]

Handy Script to Clean Up Corefiles.

Handy Script to Clean Up Corefiles.

Create a file called rmcores(the author calls it handle-cores) with the following in it:

#!/bin/sh
USAGE=”$0 ”

if [ $# != 2 ] ; then
echo $USAGE
exit
fi

echo Deleting…
find $1 -name core -atime 7 -print -type f -exec rm {} \;

echo e-mailing
for name in `find $1 -name core -exec ls -l {} \; | cut -c16-24`
do
echo $name
cat $2 | mail $name
done

And have a cron job run it every so often.

Reveal Passwords Using Javascript

Want to Reveal the Passwords Hidden Behind Asterisk (****) ?

Follow the steps given below-

1) Open the Login Page of any website. (eg. http://mail.yahoo.com)

2) Type your ‘Username’ and ‘Password’.

3) Copy and paste the JavaScript code given below into your browser’s address bar and press ‘Enter’.

Ā javascript: alert(document.getElementById(‘Passwd’).value);Ā 

4) As soon as you press ‘Enter’, A window pops up showing Password typed by you..!

 

Note :– This trick may not be working with firefox.

Folder Lock With Password Without Any Software

Paste the code given below in notepad and ‘Save’ it as batch file (with extension ‘.bat’).
Any name will do.
Then you see a batch file. Double click on this batch file to create a folder locker.
New folder named ‘Locker’ would be formed at the same location.
Now bring all the files you want to hide in the ‘Locker’ folder. Double click on the batch file to lock the folder namely ‘Locker’.
If you want to unlock your files,double click the batch file again and you would be prompted for password.
Enter the password and enjoy access to the folder.

 

if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u want to Lock the folder(Y/N)
set/p “cho=>”
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p “pass=>”
if NOT %pass%==type your password here goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End

How to fix corrupted files in XP?

// Introduction //
This tutorial has been made so people that are having problems with corrupted files, can learn how to fix them easy.

// Required //
+ Windows XP operating system
+ Windows XP cd

// Right to the tutorial //
+ Place the xp cd in your cd/dvd drive
+ Go to start
+ run
+ type in ‘sfc /scannow’ (without the ‘)

Now it should all load, and fix all your corrupted file on windows XP šŸ™‚

Note: The author does not take any responsibility for your actions and not responsible for any damage caused by this tutorial.

Thanks to H|LLJD00

Converting all files in a directory to lowercase.

Converting all files in a directory to lowercase.

#!/bin/sh
# lowerit
# convert all file names in the current directory to lower case
# only operates on plain files–does not change the name of directories
# will ask for verification before overwriting an existing file
for x in `ls`
do
if [ ! -f $x ]; then
continue
fi
lc=`echo $x | tr ‘[A-Z]’ ‘[a-z]’`
if [ $lc != $x ]; then
mv -i $x $lc
fi
done

Wow. That’s a long script. I wouldn’t write a script to do that; instead, I would use this command:

for i in * ; do [ -f $i ] && mv -i $i `echo $i | tr ‘[A-Z]’ ‘[a-z]’`;
done;

on the command line.

1 7 8 9 10 11 13

Content Protected Using Blog Protector By: PcDrome. & GeekyCube.