Firefox 16, a treat for developers http://t.co/cnd27CzT
Remove all emply folders in 1 command
Q : How to remove all emply folders from command line ?
A : There is a good way to remove all emply folders in 1 command , everything will be done using a script so please copy the script bellow to a file with name script then make it executable : +x
chmod +x script
then execute the script with
./script path
the script will give you the choice to edit and the approuve the folders found before removing
#!/bin/bash
#Author : Mohamed Clay
clear
echo By : Mohamed clay
echo
if [ $# = 1 ]
then
touch My_Empty_Directories
echo > My_Empty_Directories
echo The directories below are empty : >> My_Empty_Directories
echo >> My_Empty_Directories
for name in `ls -p $1 | grep /`
do
ls -l $1$name | grep 'total 0'
if [ $? = 0 ]
then
ls -l $1$name | grep d
if [ $? = 1 ]
then
hide=`ls -al $1$name | grep . | wc -l`
if [ $hide != 4 ]
then
echo $1$name >> My_Empty_Directories
fi
fi
fi
done
line=`cat My_Empty_Directories | wc -l`
if [ $line = 3 ]
then
echo
echo No empty directorie has been found
echo
rm -rf My_Empty_Directories
else
cat My_Empty_Directories
echo 'Do you want to delete them (yes/no/edit):'
read answer
if [ $answer = yes ]
then
rm -rf `cat My_Empty_Directories`
rm -rf My_Empty_Directories
echo Successfully done
fi
if [ $answer = edit ]
then
nano My_Empty_Directories
rm -rf `cat My_Empty_Directories`
rm -rf My_Empty_Directories
echo Successfully done
else
rm -rf My_Empty_Directories
fi
fi
else
echo Usage : ./script PATH
fi
#END
please enjoy and report if any errors or comments
For questions please refer to our Q/A forum at : http://ask.unixmen.com
Like us on Facebook
This week Top Posts 
Top Things to do After Installing Ubuntu 13.04 ‘Raring Ringtail’ : Ubuntu 13.04 Raring Ringtail final is almost out. The final release it scheduled for release on Apri...0 comment(s) |
Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...0 comment(s) |
Howto: Upgrade to Ubuntu 13.04 Raring Ringtail from 12.04, 12,10 | Desktop & Server : Updated 05-04-2013: Ubuntu 13.04 Raring Ringtail will be released Soon, If you have ubuntu 12,10, 12...0 comment(s) |
Steganography- Hide Your Files Inside An Image in Linux : Nowadays, our personal computer is not only a work tool, it is also our private space where we sto...4 comment(s) |
How to use Remote Desktop in Ubuntu : Sometimes, we need to access our computer from other locations when we’re not at home and such. This...0 comment(s) |
Configure conky-Lua in Ubuntu (12.10 & 13.04 Raring Ringtail), Fedora, debian and LinuxMint | Howto Conky : Updated 05-04-2013: Conky is a free, light-weight system monitor for X, that displays any informatio...0 comment(s) |
Recent Posts
Recent Posts
- Steganography- Hide Your Files Inside An Image in Linux
- Unix/Linux File Recognition. Did You Know?
- Migrate from MySQL to MariaDB in FreeBSD
- Connect Your Android Galaxy Tablet to Ubuntu via USB
- ElementaryOS Beta 1 and 2 Comparison and Review
- Introduction to the Linux Command Line
- A Secure Password
- Linux Kernel 3.10. It’s BIG!
- Monitoring Users Activity Using psacct or acct Tools in Linux
- Run Your Own Social Network Using elgg on RHEL / CentOS and Scientific Linux
Recent Comments

Maintained by
Anblik
.


















DragonFartOutLoud
| #
it went to china.
DragonFartOutLoud
| #
great review! i’ve been using it as my main OS since Beta 1 release. its been a awesome ride so far :)
jet li
| #
i try the method, and i unzip the image contain zip secret, i dont find the file that i was hide, where it go? and how to open it? :s
zinovsky
| #
Yes, it is possible using Steganography, we will post another quick howto do that in the next few days
SK
| #
Hey Abhishek
Yes there are many open source tools available to meet your requirements. They are easy to manage and has a decent web gui to configure. We will publish all of them one by one shortly. Stay tuned with us.