Skip to main content

Posts

Showing posts with the label Auto Delete

Linux find empty directories and files

 How to find or identify empty directories or files in Linux? It can be done easily with find command itself. Here's the syntax and how to test. mkdir test_empty cd test_empty create some dummy directories: mkdir {dummydir1,dummydir2,dummydir3} then create some empty files: touch {file1empty,file2empty,file3empty} To find empty directories: find . -type d -empty To find empty files: find . -type f -empty All directories and files will be shown since they are empty. Add some text to the file: echo "Test" > file1empty Run again the command: find . -type f -empty file1empty will not be on the list since the file has some text. Move the file1empty to dummydir1. mv file1empty dummydir1 Run the command to find empty directories: find . -type d -empty dummydir1 will not be displayed since file1empty is inside of it. How to remove or delete empty directories or files? In production or any environment, make sure you know what you are doing. In a testing environment, it can be d...

Windows 7 shortcuts automatically disappear

Desktop Shortcuts are being deleted automatically, not by you or anyone else but the system does it for you. Read on to find out how to turn off the system maintenance that does this routine. Have you come across that your desktop shortcuts are automatically gone from your desktop and you haven't done anything? And you suspect some ghost playing around on your desktop or your having hallucination. Yes, they  will be automatically disappear  even you don't do anything. It's nothing fancy about it. Windows 7 will  automatically delete your desktop shortcuts when it does a routine maintenance. It is documented in  Microsoft site from  this link:        http://support.microsoft.com/kb/978980?wa=wsignin1.0 Quote from Microsoft knowledge base Article ID 978980 On your Windows 7 PC, shortcuts that you create on the desktop may be missing. This can happen if the System Maintenance troubleshooter detects the shortcuts as broken. Th...