After permanently deleting a directory from my linux system, I have realised that, I have deleted the wrong directory. To recover the same I have used extundelete.
extundelete is a utility that can recover deleted files from an ext3 or ext4 partition. The ext3 file system is the most common file system when using Linux, and ext4 is its successor. extundelete uses the information stored in the partition’s journal to attempt to recover a file that has been deleted from the partition. There is no guarantee that any particular file will be able to be undeleted, so always try to have a good backup system in place, or at least put one in place after recovering your files!
Restoring deleted files in linux
Repairing file system in linux
In rare case you have to forcefully restart the linux system. This may damaged filesystem. With fsck you can check and repair the Linux file system.
Note:
Dont run fsck on mounted file system.
1. Boot the machine in single mode
init 1
2. Unmount the file system
umount /dev/your_device
3. Check for bad blocks and repair them automatically
fsck -t ext4 -pycv /dev/your_device
Following are the common options you can use with fsck
-p Automatic repair (no questions) -n Make no changes to the filesystem -y Assume "yes" to all questions -c Check for bad blocks and add them to the badblock list -f Force checking even if filesystem is marked clean -v Be verbose
Disabling USB storage in Linux
Earlier we have covered how to block usb storage device on windows. Now we will see how to block usb storage on linux.
To disable run following commands:
echo 'install usb-storage : ' >> /etc/modprobe.conf mv /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko /root
To enable run following commands:
mv /root/usb-storage.ko /lib/modules/$(uname -r)/kernel/drivers/usb/storage/ modprobe usb-storage
Network Simulator for linux
GNS3 is a graphical network simulator that allows simulation of complex networks. GNS3 is an excellent complementary tool to real labs for network engineers, administrators and people wanting to pass certifications such as CCNA, CCNP, CCIP, CCIE, JNCIA, JNCIS, JNCIE.
It can also be used to experiment features of Cisco IOS, Juniper JunOS or to check configurations that need to be deployed later on real routers.
This project is an open source, free program that may be used on multiple operating systems, including Windows, Linux, and MacOS X.
Features overview
- Design of high quality and complex network topologies.
- Emulation of many Cisco IOS router platforms, IPS, PIX and ASA firewalls, JunOS.
- Simulation of simple Ethernet, ATM and Frame Relay switches.
- Connection of the simulated network to the real world!
- Packet capture using Wireshark.
Collage maker for linux
Ever want to create collage in linux? Then Shape Collage is the answer. Shape Collage was started by Vincent Cheung in 2007 because he had thousands of photos and didn’t know what to do with them. He thought about making a photo collage with his photos, but didn’t like the existing collage making programs. They required too much work to make a collage, they didn’t look nice, and they didn’t give you enough control. He begin tinkering around and invented a new algorithm for automatically arranging photos in a collage. Vincent then realized that his algorithm wasn’t restricted to just boring rectangular collages like everyone else, and so, Shape Collage was born!
Shape Collage is the only collage maker that:
- Optimally arranges photos
- Creates collages in different shapes
- Can handle thousands of photos
- Generates super high-resolution images (up to 200 megapixels)
- Makes collages in just seconds
Download
Shape Collage
Requirements
You need java installed on your machine. To know how to install java you can refer my previous post.
Running Shape Collage:
cd /tmp/ wget http://www.shapecollage.com/2.5/ShapeCollage-2.5.tar.gz tar zxvf ShapeCollage-2.5.tar.gz cd "Shape Collage" ./Shape\ Collage