Ubuntu :: Remove Directories That *don't* Contain A File - Safe Testing Method?
Apr 15, 2011
I'm trying to clean up an iTunes-sorted Music directory. For whatever reason, it contains a large number of folders that have album art, but no music. I'm actually more concerned about a safe way to test my removal batch, but I thought I'd paste everything I did in case it's useful to someone. Based on this thread, I came up with the following script:
Code:
#!/bin/bash
find ./*/* -type f -iregex ".*(mp3|m4a)" | sort | while read line ; do
echo "${line%/*}" >> file1
done
sort -u file1 > fileuniq
[Code]...
But I'm scared to just run this on my music folder. Is there any way to run rm in "test mode", so that I would just see verbose output, but it wouldn't actually delete anything? Failing that, does anyone see anything wrong with my plan?
View 4 Replies
ADVERTISEMENT
Nov 17, 2010
Any way to add / remove directories within the Unity File Manager?If so how, If not and Ubuntu is looking to make Unity its default file manager... I will just have to say goodbye to Ubuntu. After all what's a file manager if you can't add or remove files or directories.
View 9 Replies
View Related
Mar 11, 2011
After trying to use the safe-upgrade command with aptitude, I receive these errors:
apt (0.8.11) unstable; urgency=low
apt-get install pkg/experimental will now not only switch the candidate of package pkg to the version from the release experimental but also of all dependencies of pkg if the current candidate can't satisfy a versioned dependency.
View 2 Replies
View Related
Jun 1, 2011
So I upgraded Ubuntu and was greeted by Unity. I was unsure of it at first and figured I would give it a shot. It has failed miserably in almost every way aside from looking nice in some instances. It's slow, clunky, and was a total wreck to my efficient use of the computer. But they can't all be winners I suppose. I can see where it would be useful (since it seems more finger-friendly) on a tablet device, but I'm using a standard notebook, not a tablet.
That being said, I switched back to what is now "Ubuntu (Classic)" and have put things happily back on track. However, since I have no intentions of ever bothering with Unity again, I want to remove it - it's just wasting space. My questions are, would this be safe? Are Unity and Ubuntu entwined to the point where doing so would make future updating/upgrading a problem? If it is a problem for the future, I feel it would be easier to just change distros (Mint, OpenSUSE, or just Kubuntu) - any recommendations?
View 9 Replies
View Related
Oct 1, 2010
Would like to use Ubuntu Tweak on 10.10 beta. Is it safe to remove everything that its cleaning section finds? Or do I have to look carefully at what it removes? Can I just let it remove everything it finds and not worry that something I have installed will be affected?
View 2 Replies
View Related
Jul 11, 2011
PROBLEM: My computer has an nvidia video card. I'd like to remove the packages that support ati and radeon. When I try to remove xserver-xorg-video-ati or xserver-xorg-video-ati, the package manager wants to remove xserver-xorg-video-all.
QUESTION: Is it safe to remove xserver-xorg-video-all? Obviously, I want to keep support for my nvideo card.
View 9 Replies
View Related
Jul 12, 2011
if i use the safely remove option with disk utilty to power off a drive, is there any user friendly way to restart it (so the system sees it) without unplugging/plugging back in or restarting?
View 2 Replies
View Related
Apr 9, 2010
I'm running CentOS 5.4 in combination with DirectAdmin, and I'm wondering: Is it safe to remove /media and /opt directory?Because those directories /media and /opt are empty.
View 3 Replies
View Related
Jan 2, 2010
I have settled on Ubuntu 9.10 as my preferred distro and was keen to try out which desktop I preferred so I installed kubuntu-desktop and all its dependencies via synoptic package manager following a guide on psychocats.net. Decided I preferred Gnome and wanted to get rid of all duplicated applications etc so followed same guide to remove. [URL]
[Code].....
View 2 Replies
View Related
Jul 26, 2010
Is there any risk to deleting program entries from gconf-editor? It's very busy with software I'veuninstalled, which makes it fractionally harder to find entries when I want to edit them.
View 1 Replies
View Related
Oct 13, 2009
I just installed grub2 on my laptop and everything works fine and boots right. It gave my the option to run
'sudo rm -f /boot/grub/menu.lst*' after the installation because it said it could not determine itself if these files were necessary to keep.
I'm not sure what files they are exactly, or how to find them either, but do people usually delete them after upgrading?
View 2 Replies
View Related
Apr 21, 2011
I have a centos server x86_64 arch installed - i am getting some issues where i want to update rpms but because there is a equivliant i386 package installed i get dependency errors.Is it safe to run this command to remove all i386 packages - will my system still boot after this yum remove *.i?86
View 1 Replies
View Related
Jul 17, 2011
Can I safely remove the lost+found folder from a disk that is going to be used exclusively for music?
View 3 Replies
View Related
Mar 13, 2015
I added 'testing' channel into my wheezy 'stable' box and installed packages comes from 'testing'. In this case, if I changed my mind to go back to 'stable', how could I downgrade packages updated by 'testing' channel?
View 13 Replies
View Related
Jan 1, 2010
I have a string of files named recup_dir.1 thru .66. I have the command sudo rm -r /home/"name"/Pictures/recup_dir.1 to remove them one at a time, how do I remove 20 or thirty at one command?
View 5 Replies
View Related
Feb 8, 2011
I have just upped from lenny to squeeze. I didn't mean to, really, but the package manager was well into its stride by the time I realised what was happening. Mostly all went well, BUT /usr is now 100% full. I notice that there are duplicate files in /usr/lib, eg Oct 11 22:35 libgcj.so.10.0.0 and Sep 14 2008 libgcj.so.90.0.0 (I assume the latter has been replaced by the former?). Is it safe to remove the "outdated" lib files? Is there an elegant way of doing it?
View 4 Replies
View Related
Aug 8, 2010
I'd like to remove all directories of a certain depth that don't contain .txt or .log files -- is this possible? So far I have: find ~ -mindepth 3 -maxdepth 4 -type d -exec rm -r '{}' ; Is it possible to add in "only if the directory doesn't contain .txt and/or .log files"? Or do I have to start learning perl to do that?
For example:
dir 1:
hello.txt
runme.sh
dir 2:
runme.sh
oct12.log
[Code]....
View 13 Replies
View Related
Apr 25, 2011
I have tried this a million ways, got it to work once but it didn't work sitewide for some reason. I have a url: [URL] and I want it to be found by going to: [URL] I am using this
Code:
RewriteCond %{REQUEST_URI} ^/agents/tp/
RewriteRule ^([^/]+)/?$ agents/tp/$1/index.php [L]
and have also tried something as basic as
Code:
RewriteCond %{REQUEST_URI} ^/agents/tp/
RewriteRule ^(.*)$ agents/tp/$1/index.php [L]
I keep getting "The requested URL /JoeAgent/ was not found on this server." why it's not working?
View 4 Replies
View Related
May 8, 2011
When I run yum list installed command the output shows two kernels:
[Code].....
Would it therefore be safe to remove the first kernel in the installed list to save having two kernels being updated everytime I run yum update? Or is the PAE kernel dependant upon the original?
View 6 Replies
View Related
Mar 15, 2010
I have hundreds of directories in various subdirs that I need to remove. I want to remove all of these dirs, but can only find solutions on how to do remove files (or how to remove subdirs from within the current dir).
I think I need something like
find -iname 'testfile*' | xargs rm -i
where I want to remove every directory that contains the word 'testfile' within the directory name. I know xargs wont work for dirs,
View 9 Replies
View Related
Jan 8, 2010
Is there a way to do the rm command where I can remove files by owner. I run the standard ls -al command and I want to be able to remove the files that are owned by me in that current directory. One other step how can I remove files in all directories owned by me. I did the google search first guys and a majority of the pages just dealt with the basics like rm -r
View 5 Replies
View Related
Sep 10, 2010
What is the single command that will remove all 'other'permissions from all files and directories under /home.
Just starting to learn Linux.
View 1 Replies
View Related
Feb 9, 2011
this is my first post and I am not sure if this belongs here or in hardware.Now for the main post!
setup:
Dell Demension 4400
Intel(R) Pentium(R) 4 CPU 1.60GHz, 1 cores
[code]...
View 4 Replies
View Related
May 4, 2010
I was running '# ls -l' in '/' directory and I noticed all directories in '/' have the following permeation 'drwxr-xr-x' [except root's home which is 'drwx------' (after I change it from 'drwxr-xr-x' )]
I don't want all the user (except root) to be able to read and execute (in) any directory, I just want every user to be abel to read/write/execute only in his/her home directory.
my question is, is it ok to change file and directory permeation of the following directories in '/' from 'drwxr-xr-x' to 'drwxr-x---' or 'drwx------' recursively?
/bin
/boot
/dev
/etc
[Code]....
-I and the other users use the pc for internet, open office and email mainly.
-It does not run server(s) like smb/cif or NFS.
-There are 5 usernames (created by me, non of them are superusers) in th pc, only one user is required to login at any one time.
View 3 Replies
View Related
Feb 1, 2011
I have a compressed text file. The method of compress is unknown.I can see the file contents by using Midnight Commander without a problem but I would like to view the file just with cat. So I am trying to uncompress the file with unzip or gunzip but it does not work.How to check the method the file is compressed with? Is any way to find it with Midnight Commander?
View 4 Replies
View Related
Jan 3, 2011
Is there a safe way to cleanup the /lib file tree? Mines gotten too large for the filesystem it's on (/), and I've already shot myself in the foot a few times trying to delete things.
View 7 Replies
View Related
Apr 15, 2009
I'm looking into using fedora as my first Linux OS, read rookie, I have an old HP PC with a brand new hard drive. I downloaded the 'F10-i686-Live.iso' file and tried to boot from it. It brought up a Fedora screen with various boot options and a memory test. I did the test which completed a successful pass. I then tried to boot from it, it showed the horizontal loading bar which turned white, after which the screen went black. From there the screen switched from blank to 'lit up black' , sometimes it showed a cursor which was mouse responsive, sometimes it showed a blinking underline cursor in the top left corner of the screen. Eventually it just stayed blank. Any threads I've checked are irrelevant or refer to a more options or command line option that isn't on the setup screen. Have I the right file/method?
View 1 Replies
View Related
Feb 4, 2011
I have a file that is a list of other files, lets say FilesIWantToTar.dat. I want to say something along the lines of tar -c input-file=FilesIWantToTar.dat archive.tar or similar. Does the tar utility provide this functionality, or do I need to write a simple script?
View 1 Replies
View Related
Mar 16, 2011
I have created a customized RHEL 5.4 DVD and placed a Kickstart file in it.It is running fine except I have to manually choose "Local CDROM" in the installation process. (see attached pic)Any idea how to skip this.
View 3 Replies
View Related
Mar 21, 2010
The way I organize all my files into their folders, they add up quickly. I like having a quick way to keep more frequently accessed folders at the top of the list in explorer. In windows, folder "[zippidy do da]" would appear above folder "aardvark" because of the brackets, but Ubuntu's file browser ignores the brackets, making my old method ineffective. I could put a zero in front of such folders
View 5 Replies
View Related