Fedora :: How To Delete Folders With Stuff In Commandline?
Dec 21, 2010I want to delete a folder with stuff in it through command line. I tired rm and rmdir but it doesn't seem to be working.
View 3 RepliesI want to delete a folder with stuff in it through command line. I tired rm and rmdir but it doesn't seem to be working.
View 3 RepliesI have an FTP server on my network (currently ran on IIS). When I connect with Nautilus to FTP and try to delete folder (files delete works) I get error.I tried Filezilla and Gnome-Commander as clients - they cat delete directories just fine. I tried to solve this problem for months because I like the convenience of having my FTP bookmarked in Nautilus and use it from there.Today I finally found a reason for Nautilus not being able deletedirectories, but I can't find a solution to that. I've checked FTP logs and saw that all working ftp-clients are performing RMD on directory name only, while Nautilus always prepends directory name by / symbol. So, let's say I'm trying to delete folder call "Test"Filezilla and Gnome-Commander are logged as doing RMD on "Test", but Nautilus was logged as doing RMD on "/Test" and server replied that "/Test" folder doesn't exist
View 1 Replies View Relatedhow can i delete these folders without recieving errors?
View 7 Replies View RelatedSlackware-specific i suppose as I sometimes run out of root space and want to delete stuff in /tmp.
Code:
#!/bin/bash
# ~/bin/cleantmp
# Script to delete contents of /tmp folder, giving the option to delete
[Code]....
I decided to install a game under Wine. It didn't work so I uninstalled it. The game still shows up under the Wine section. I tried going to the uninstall in the game folder and it said "Failed to change to directory '/home/user/.wine/dosdevices/c:/Program Files/Ubisoft/Gearbox Software/BrothersInArmsEiB/System' (No such file or directory)". When I go to Wine -> Uninstall Wine Software it doesn't show up, but the folder is still under wine -> Programs.
I brought up the directory and the folder doesn't exist. How can I remove it from the programs list under wine?
I logged in via ssh to a computer and I can delete stuff that I should not be able to delete. I figured if the owner is different and the group is not mine and iit is 744 I should not be able to delete it...so I tested with "file1"..and I dont see my mistake:
users are "itv-storage" and "admin" on pc.
HTML Code:
itv-storage@pc:/RAID5/storage/test$ ls -la
total 12
drwxrwxrwx 3 admin admin 4096 2011-03-16 19:28 .
drwxrwxrwx 9 admin admin 4096 2011-03-16 18:37 ..
-rwxr--r-- 1 admin admin 0 2011-03-16 19:28 file1
drwxrwxrwx 3 itv-storage itv-storage 4096 2011-03-16 18:46 folder1
itv-storage@pc:/RAID5/storage/test$ rm file1
rm: remove write-protected regular empty file `file1'? y
itv-storage@pc:/RAID5/storage/test$ ls -la
total 12
drwxrwxrwx 3 admin admin 4096 2011-03-16 19:32 .
drwxrwxrwx 9 admin admin 4096 2011-03-16 18:37 ..
drwxrwxrwx 3 itv-storage itv-storage 4096 2011-03-16 18:46 folder1
itv-storage@pc:/RAID5/storage/test$
I got this part from my script working that it will delete a folder is from 8 days agoEightDaysAgo=`(date --date="8 days ago" +%d-%m-%Y)`rm -rf $EightDaysAgoTarHowever I need to remove files that are older than 8days for example if the script is'nt run for a day it will remove both the 9th and 8th day one not just the 8th day one. If I'm making any sense lol
View 3 Replies View Relatedi tried to install the kiba-dock. i wasnt successfully in any of my attempts. i would get through about half way then have to find somewhere else that had different commands and advice. how do i delete the stuff that did save as to not fill my computer with crap im not using?
View 2 Replies View RelatedI have the following structure:
/.svn
/bla/.svn
/hello/.svn
/bla/bla/bla/.svn
... etc
I want to delete all the .svn folders. How do I do it?It's NOT:
rm -rf .svn
In windows you use the /s trigger. How do you do it linux?
I can't delete folders from ubuntu one's web site there is no delete button that i can find.
View 3 Replies View RelatedAlthough I've been using Ubuntu for a while, I haven't really done any scripting thus far,but now find myself needing to do (what I thought was) some fairly simple stuff.However, despite much searching, I have been unable to find a solution to my problem.I need a script which will delete all of the files/folders from a directory except those I specify. From the command line, I am able to use:rm -r !(constant|system|*.msh|)
which works fine, deleting everything except the 'constant' and 'system' folders (and everything in them) and any files ending in '.msh'. I have tried to put this into a script file, specifying to use the bash shell, and escaping the required characters, but I just get the message 'cannot find !(constant|*.msh)'.I have read that using the find command may be a better way of doing it, but so far I have not been able to make the command work in the way which I need (I have easily been able to delete ALL the files/folders in the directory!).
I noticed after uninstalling Firefox that the folder is still listed in the files/etc ... how do I delete these files?
/etc/firefox
/etc/firefox-3.0
/etc/forefox-3.5
I just had a bad experience with a server, and now i have a 17GB lost+found. It appears a lot of the stuff in there are folders which are empty. Since those really serve no purpose as far as recovering data from what I can tell, is there a slick way to delete just the empty folders from my /data/lost+found folder, leaving me with just the stuff I truly need to look through?
View 3 Replies View RelatedI have a USB drive that has a TON of folders on its root level. I want to remove all those folders and their contents except three of them. I know if I do rm -rf that will kill everything, is there a way to exclude three folders, say folder1 folder2 newfolder, and do it all in one statement?
View 3 Replies View RelatedHow would i delete all the folders access one i specify.for example if a there are 4 folders namely a b c and d. How would i prevent deleting folder b .Whatever folders other than b should be deleted?
View 13 Replies View RelatedCurrently I am doing a java project and I renamed some file/folders to start with '.'. i.e. ".project", ".classpath", ".settings/"
I can see them on my desktop but i cannot delete them. In the terminal, "ls" command does not show these files exist. "rm" will also say cannot find these files. How do I get rid of these files/folders?
I have a daily backup script executing on my server. I would like to be able to delete the "last" backup. for ex the folder that's 30 days old.
How to find a command that will check for the oldest folder ? Then do an action with that folder. In this case, delete.
I am happy to report I successfully setup a cloning station using Ubuntu 10.4 Lucid Lynx and Clonezilla. I learned the hard way you have to restore images to a hard drive of a larger size than the drive the image was ripped from. I had already ripped 6 or more images and have them in the Home_Partimag folder and cannot delete or rename these images. I want to remake these images and rip them from smaller hard drives. Any commands I can use to be able to do this?
View 3 Replies View RelatedI want to know how much damage a user can do on my system if he decides to delete everything (or write to in case of corruption).What command or script might i use to check this?
View 3 Replies View RelatedI have a Ubuntu file server with a mix of 30+ users ( mix of windows and linux ).All are members of the same group. All need read write create access. I want to prevent deletion of certain key folders. How can I achieve this ? sudo chmod -R nnnn ??
View 8 Replies View RelatedI have installed a new system on my desktop computer, and would now like to delete files/folders from the web interface, as they no longer reflect the files and folders on my desktop PC. I use my desktop PC to sync files and folders one way to my laptops.
View 9 Replies View Relatedi have been copying dvd's and now i do not have enough room in my temporary folder,but i cannot find out how to delete the folders and make space to continue
View 7 Replies View RelatedCan't rename, move or delete files or folders that have a foreign character.
Code:
The file or folder /data/down/done/1999 Taraf de Ha-douks does not exist.
Kubuntu Karmic. Fails in konqueror and dolphin.
I recently moved to a new machine, and I copied my entire home folder across. This included lots of hidden (starting with '.') folders, and in many cases they are config folders for packages which I have not installed on the new machine. They are taking up space, so I would like to delete them, but to go through manually and figure out which ones I need would be very laborious. Is there a way to find, and perhaps delete, config folders for packages that are not installed?
View 2 Replies View RelatedI'm getting permission errors. Delete folders and files from main installation from when booted from live cd?
View 9 Replies View RelatedI am administrating a lab in a university and every semester we need to delete all the home folders of the accounts for the next semester. I would like to make a bash script that does this automatically and having trouble with it. Note that I am writing my very first bash script. What I need to do is make a script to delete the following:
Delete everything in /home/$exp$num/$dir
when "exp" could be either "rt", "ic" or "sp".
"num" could run from 1(single digit) to 45 and dir is "profile" and "work".
This is what I tried to write:
Code:
#!/bin/sh
cd /home
for exp in "rt ic sp"
do
[code]....
What seems to be the problem is the reading of "$exp$num" as a joint expression.
I have an archive directory that needs to be cleaned up once per quarter. The top level (/data/archive/*) directory names change daily, as well as the subdirectories and the filenames (the application names everything according to date). Also, there are two top level directories, bin and incoming, that we can't touch. I want to write a shell script that loops through the 15 or 20 top level directories and deletes all files and subdirectories older than 3 days (skipping the bin and incoming folders). Can someone get me started on a script? I am kinda new to shell scripting.
View 2 Replies View RelatedI use a kickstart configuration file to load Fedora automatically, and for previous versions had no difficulty. With fedora 13 instead of getting the gnome gui at startup, I get an administrative tools window allowing me to adjust installation settings and after exiting I get a command line login, instead of the gnome gui. Is it possible to, through kickstart, change the environment from the command line back to the gnome gui
View 1 Replies View Related10.10 on a ext4 partition. I deleted a folder that sat on a NTFS partition that I use as data storage. I note that if I delete folders or files on this NTFS partition there is not the option to move to waste basket - it is just deleted. If the folder still exists on the hard drive (has not been over written) I may be able to retrieve it - but where could it be? On the NTFS partition?
View 2 Replies View RelatedMany folders within a subdirectory some of which have lots of data in and some of which have only one specific file called produkt.fil inside.I need a command to find and delete those folders that contain ONLY the file produkt.fil - if other files exist (doesnt matter what they are) then they should be left alone. Note: produkt.fil exists in all of the folders always.
View 5 Replies View Related