General :: Delete Directories Smaller Than X
Jun 14, 2010
How can I delete Directories which are smaller than, say, 1000 KB?
I already have a file list from the command:
But I don't know how to proceed.
Update:
The output of:
Is something like:
View 2 Replies
ADVERTISEMENT
Jul 29, 2010
How would I delete everything in a directory except for three specified directories?
So far I discovered I can omit the directories like so in a find search code...
View 6 Replies
View Related
Oct 24, 2010
how to write a short script file to read file (text) contains a list of directories name and delete everything in it. There are 10,000 directories - So there is NO WAY I can do manually.
View 8 Replies
View Related
Jul 13, 2011
I have tried to find the solution for my problem on this site and other sites but haven't found a good enough answer yet. Maybe some of you can help me out here?What i need is a script (bash preferrably) that can delete directories based on a date in its dirname.For example.I have a bunch of directories that is named
data-20110623/
data-20110624/
data-20110625/
[code]...
View 5 Replies
View Related
Mar 4, 2011
I would like to be able to recursively delete specific various files from a directory and sub-directories. For example:
Dir/
|_sub1/
|
|_ _rm *file1 *file2 *file3
[code]....
View 11 Replies
View Related
Aug 16, 2011
I'm looking for a Bash script that will go into a list of directories and delete all but the four most recently created files.
How can I do this?
View 4 Replies
View Related
Oct 25, 2010
i've been wondering how do i know if some users create/modify/delete file/directory in linux, i've been using pyinotify in python script.this script like the example from the manual:
Code:
#!/usr/bin/python
import pyinotify, os, time
[code]...
View 10 Replies
View Related
Jan 20, 2011
is there any way so that we can restrict root to delete a file/directories and What is extended file attributes.
View 12 Replies
View Related
Jan 22, 2011
I am using 10.04 LTS Lucid, and I notice the free space of root is getting smaller and smaller.
Five months ago, there was about 3.9GB free space of root, but now it is only 1.6GB. I always run sudo apt-get autoremove and sudo apt-get autoclean every time the update is finished, and also use Bleachbit to clean the system, but both are useless.
I never faced such problem with older versions of Ubuntu, is there any measure to fix it?
View 6 Replies
View Related
Sep 23, 2010
I discovered two folders marked with a cross in my root:
- root
- lost+found
And when I'm trying to reinstall a newer version of Netbeans, 6.9.1. it claims that there is already something running in 'root folder "The installer lock file exists at /root/.nbifile/.nbillock"
The question is - is those folders are needed for Ubuntu working? -If not how to delete them? And one more question - how to delete a programme from the 'Applcations-Programming'? I tried to do that via 'System-Preferencies-Main Menu' and tried to delete a previous version of Netbeans, but it didn't work, - nothing happens, the previous version is still there, so I have two ones - 6.9.1 and 6.9.
View 2 Replies
View Related
Feb 1, 2011
I have two users in home on Debian stable: user1 and ftpuser.Proftpd is configured so that it uses ftpuser for clients.How to set it up so that user1 can modify, delete, etc.. all files and directories that ftpuser creates?
View 3 Replies
View Related
Jan 23, 2011
I am using 10.04 LTS Lucid, and I notice the free space of root is getting smaller and smaller. Five months ago, there was about 3.9GB free space of root, but now it is only 1.6GB. I always run sudo apt-get autoremove and sudo apt-get autoclean every time the update is finished, and also use Bleachbit to clean the system, but both are useless.
I never faced such problem with older versions of Ubuntu, is there any measure to fix it?
1. There is not any .deb in the /var/cache/apt/archives.
2. The total content of /var/log is only 167.6 MB, that won't be a problem.
View 5 Replies
View Related
Dec 19, 2009
i am in need of linux help. iam at college and i need this back/restore script to pass this final part of an assessment. i require a backup script that will not only backup but also restore files to the relevent directories. e.g. users are instructed to store all wordprocessor files in a directory named wp. so i am needing to create a backup directory and 3 directories within that and some files within the 3 directories and then back them up ot restore them. l know i should/have to do this myself by been trying to get/understand info for the last few days and came up with zero.
View 14 Replies
View Related
May 15, 2011
I want to make a webserver with multiple users allowed to login through SFTP to a specific folder, www.Multiple users are added, lets say user1 and user2, and all of them belonging to the www-data group. The www directory has an owner www-data and a group www-data.
I have used chmod -R 775 on the www folder, but after I try to create a folder test through my SFTP server (using Filezilla) the group of the directory created has only r and x permissions, and I am not able to log in with the second user user2 and create a directory within www/test due to a lack of w permission to the group.
I also tried using chmod 2775 on www directory, but without luck. Can somebody explain to me, how can I make it so that a newly created directory inherits the root directory group permissions?
View 2 Replies
View Related
Mar 23, 2011
I am writing a script, in that my requirement is, if all the fill types stored in one directory from that we need to separate different different directories based on the file types.
for example in a directory(anish). 5 different types files
1- directory
2- .txt files
2- .sh files
like that and my requirement is the (1- directory is moved to one new directory(dir) which we are given in the script)and (2 .txt files are moved to another new directory(test) which we are given in the script)and ( 2 .sh files are moved to another new directory(bash) which we are given in the scrip)finally the directory anish should be empty..using bash script.how it is possible !!
View 7 Replies
View Related
May 22, 2011
I ordered a new laptop which has a conventional hd with the pre-intalled os on it. I would like to make an image of all the software that is installed on this conventional hd and move it to an ssd which I will use to replace the hd. Problem is that the conventional hd is 320GB and the ssd is only 240GB. All solutions I've found require the target partition to be at least as large as the source.Is there any way of doing this using linux?
View 8 Replies
View Related
May 24, 2010
In a few hours I'll have a new 500GB Sony laptop, filled with the usual Sony rubbish which I'll promptly be replacing with Ubuntu or Crunchbang or something. However, first I want to make a full clone of the drive (including recovery partitions), should I wish to return it to Sony or sell it on in its factory state.
The problem is that the only backup drives I have are less than 500GB - the biggest I have is 250GB or so! So I need to backup and compress on-the-fly.
What's the best way to do this? Presumably dd piped into gzip would do the trick, or does anyone have any other suggestions to accomplish this?
View 3 Replies
View Related
May 31, 2011
How I need to modify SPEC file to create two RPM packages instead of one big?
View 12 Replies
View Related
Feb 28, 2011
I have a zenity message box in a script
zenity --info --text='done' > /dev/null 2>&1
I need to pop up a message, e.g.: "file is smaller then 30 KBytes!" when a file is smaller then 30 KBytes. How could i write an "if then else" script to pop up a zenity message, when e.g.: "FILE" is smaller then 30 KByte?
View 3 Replies
View Related
Sep 16, 2010
One thing that I didnt like about gnome is the huge gtk+ interface and controls. Everything is so large.
Is it by design? Or I can make the overall interface smaller by some tweaking? If so then how? This question arose while I was using eclipse in fedora gnome.
View 1 Replies
View Related
Jul 10, 2010
I need to clone a 160GB hard drive with Linux Mint 9 (not more than 10GB used) to a 30GB SSD that is partitioned carefully (aligned to cylinder boundaries) and is currently running Ubuntu (which I wish to overwrite with Linux Mint 9). The SSD has a /boot partition, / and swap. The source (160 GB) does not have a separate boot partition. Can anyone help me fill in the steps below? /dev/sdc will be the source (160GB) and /dev/sda is the target (with partitions 1,2 and swap on 5).
make a copy of /etc/fstab from the target drive before proceeding. Ready the target partitions. Can I reuse the existing destination partitions on the SSD? Ready the filesystems on each of the target partitions. /boot is ext2, / is ext4 and swap is already set up too. As I said, all contain data (Ubuntu) that I wish to overwrite. So what steps are needed here? Do I need to erase anything (files, etc.) before the copy/clone? next, use dd to copy MBR (right?) And exclude partition table:
Code:
dd if=/dev/sdc1 of=/dev/sda1 count=1 bs=446
Mount the source and destination drives:
Code:
mount -t ext4 /dev/sdc1 /mnt/source
mount -t ext2 /dev/sda1 /mnt/boot_target
mount -t ext4 /dev/sda2 /mnt/root_target
I suppose I can leave the swap partition on the target untouched. Copy the files from the source partition to the destination
Code:
cp -a /mnt/source/boot /mnt/boot_target
cp -a /mnt/source/ /mnt/root_target
then I assume I go to /mnt/root_target and delete the /boot directory, right? Change /etc/fstab to reflect the new partitions. I mount by label. Will my partition labels be intact after this? Do I have to make any changes to GRUB? Anything else?
View 14 Replies
View Related
Aug 18, 2011
I'm looking for a way to compress a large file (~10GB) into several files that wont exceed 150MB each.
Any thoughts?
View 2 Replies
View Related
Sep 1, 2011
Tool like Media File Segmenter for Linux
I know that one can use ffmpeg to extract a smallfile.avi from a largfile.avi. But What I am looking for is an tool/command to split a large file into several files of a given size.
View 1 Replies
View Related
May 28, 2010
I've decided that I want to use another, smaller, hard drive for my OS and I'd like to clone /dev/sda onto /dev/sdc. I want it to be an exact clone except my partition for my "/home" will be smaller (since there's not room for it). I was gonna try with dd but I'm not sure if I should build the partition table and use dd-command on one partition at the time? Will this then include GRUB boot loader and will it be working properly?
Do I have to clone the disk completely for it to boot properly? I'm not sure how or where GRUB places itself on disks as you install it. Can I perhaps copy the partitions one by one and then install GRUB from CD afterwards? Should I leave some unallocated space somewhere in between the partitions as I build and clone them?
View 4 Replies
View Related
Apr 7, 2011
1. How sum of system time and user time can be greater than real time ?
2. Even though my program is not waiting for any I/O the real time is smaller than system time as shown
root@chaitu:/home/chaitu/Desktop/Chk# time ./new
real0m0.001s
user0m0.000s
sys0m0.004s
View 4 Replies
View Related
Apr 14, 2010
I have a Logitech ambidextrous trackball, with a left and right mouse button. The trackball device also has two smaller left and right buttons. I'd like to know how those two smaller buttons are addressed. Ultimately, I'd like to assign certain keystrokes to them, to make work faster. For example, ALT+<right arrow> moves a browser back one page. how to name these keys, or whether/how I should address this USB mouse. FWIW, I'm actually using it through the PS/2 mouse adapter, since that doesn't take a USB slot.
View 1 Replies
View Related
Feb 8, 2010
And we are unable to restore the setting because the button to click on to do so is outside of the viewable screen! Also we have lost the start bar/dock at the bottom of the screen and cannot figure out how to get it back.
View 1 Replies
View Related
May 19, 2011
I recently installed Linux Mint Julia 10 on my netbook and it is great.no issues from USB install.My question is what is a smaller distro I can use for netbook...and will it install as easy as Mint 10.I only use netbook for emails and web searches for information..I have no harware issues ..except for my lack of knowledge of Linux.
View 14 Replies
View Related
Mar 1, 2010
I want to set my editor's font as Monaco-11, but it has no anti-aliasing effect. And when I set it to Monaco-12, anti-aliasing effect works. How can I make it also work for Monaco-11? I'm using Ubuntu 9.10
View 1 Replies
View Related
May 4, 2011
I got a new hard disk for my laptop and I want to move my Gentoo installation from old HDD to new.
Most simple guides recommend use of dd to copy the whole partition byte by byte.
I'm moving to the new drive because I don't have enough space on the old drive, so I don't want to simply clone the partition. Instead I need the destination partition to be bigger. Would dd work well in that case?
Assuming that I use same partition types on the new drive, would I be able to use simple cp with appropriate settings?
View 1 Replies
View Related