General :: Delete Files In A Directory - RM?
Jun 17, 2010
I have a USB drive that I boot using SysLinux. I think select one of several options to complete a task. I do not have access to edit those Kernels. I need to add a option from the Syslinux menu where I can delete all the files from a specific directory.
View 3 Replies
ADVERTISEMENT
Jul 23, 2010
I created a directory somewhere with permissions rwxrwxr-x so that other users in my group can create files and directories in it.
I do need to be able to delete the contents in this "public" directory, but it seems that while I am able to remove any files in this directory I cannot remove and subdirectories under it.
Is there a way to remove such subdirectories owned by others under a directory owned by me?
View 3 Replies
View Related
Feb 9, 2010
I know that rm -i will prompt wether you want to delete each file.But rm -i -r will prompt for each file in each subdirectory recursively. How to make it prompt just for the directory itself, and then delete its contents without asking?How to delete all the files in a directory without deleting . and ..?How to recursively delete all tilde files in a directory?How to GUI file managers delete files to Trash? Where is this "Trash" located? Can you delete to trash in the command line?
View 14 Replies
View Related
Dec 4, 2010
Here is how i am isolating the 7 latest files
Code:
ls -ltr | tail -7
is there a way to give that negated list to the rm command? or should i be using the find command with an exec {}?
View 14 Replies
View Related
Sep 28, 2010
I wanna delete a directory with its files and I wanna do that as follows: rm -r dirToDelete Unfortunately, I always get asked for EACH single file if I wanna delete this because it is write protected.... Is there a way to suppress this feedback message so that just the whole directory with its contents disappears?
View 5 Replies
View Related
Sep 21, 2010
I need a PHP script to delete a line with certain pattern from all filesin a directory. The Directory contain files with extensions .js,.html and.php. Do any body give a working code snippet to Read all files in a directory with above extension and delete that line from the files.
View 1 Replies
View Related
Nov 25, 2010
the permissions for my home directory were accidentally changed from 'access files' to 'create and delete files', and I changed them back, but ever since then I am not able to change any preferences/settings at all. power management, themes, panels, emerald, anything. my user account is supposed to be the administrator, and all the user privliges are checked. how to get control of my computer back?
View 9 Replies
View Related
Mar 18, 2010
I am facing a problem in Windows due to a virus called Newfolder.exe which creats files with the same name as it's parent directory and an extension .exe and this happens for every directory in the entire hierarchy in the infected pen drive. The antivirus detects them, but is sucking slow. So I thought this is a good opportunity to use the concepts of the all mighty shell script to remove those as they follow the same pattern. Say my complete path is
Code:
/home/pkd/fol1/
The virus would have created an file with complete paths
Quote:
/home/pkd/fol1.exe
If fol1 has two more directories fol11 and fol12 Then there would be two more .exe(virus created) in the following path
Quote:
/home/pkd/fol11/fol11.exe
/home/pkd/fol12/fol12.exe
View 1 Replies
View Related
May 15, 2011
I have a FAT32 SD card with a file on it, that, viewed in Windows the filename consists of a long string of nonsense. Viewed in my Android phone's Linux terminal, ls -a shows nothing in the directory. When I try to delete the parent directory with rm -rf deleteme, it fails with "Directory not empty". When I try to delete/move in Windows 7, it says the filename would be too long and/or Explorer crashes. Windows disk check doesn't find anything wrong. How can I delete this?
View 2 Replies
View Related
Oct 11, 2010
I am trying to dl the files located here: http://good.net/dl/bd/CCCamp-2007/video/m4v/ using wget.
Now when I use the command wget -r -A .m4v http://good.net/dl/bd/CCCamp-2007/video/m4v/
I get the just a bunch of filefolders, but no files, ex."cccamp07-de-1845-Freifunk_und_Recht.m4v" but its a folder.
View 4 Replies
View Related
Dec 20, 2010
How to create a directory in samba share in which user can write read files but neither can create more directories tree nor delete any directory.
suppose
[Share]
comment = NRshare
path = /home/share
browseable = yes
[Code].....
I know user cannot delete share directory here. But user can create any number of directories of files in share.
I would like to create directories in share which cannot be added or deleted.
View 2 Replies
View Related
Sep 21, 2010
If I am logged in as root in a linux system and I run command rm -rf on / folder, should it remove all the files? also the kernel?
View 4 Replies
View Related
Feb 3, 2010
I have been trying to write a script that will take a directory, for example /accounts compress it into a .tar file with the filename containing the date of compression, for example accounts030210.tar and then place that file into a directory called /archive
I also want the script to delete files in /archive that are older than 7 days.
View 3 Replies
View Related
Aug 17, 2010
i use ncftp for some bash script action. how to delete oldest directory and oldest file using ncftp commands?
View 3 Replies
View Related
Jan 18, 2010
How do you perform a long directory listing of all files in the /bin directory that have exactly three characters in their name?
View 1 Replies
View Related
Jan 29, 2010
Is there a way, on Linux, to cause all new files created in a directory to be owned by the directory's group instead of the creating user's group?
View 2 Replies
View Related
Oct 13, 2010
I want to run a cronjob every 15 minutes that checks a directory for files. If the directory contains more than ten files I want it to send an email to me.
All I have is this...
*/15 * * * * ls -l | wc -l | [filename] | mail -s "This is just a test" [email address]
I would rather not write a bash script. Is there an easier way to do this? I was looking into some commands like find and grep.
View 6 Replies
View Related
Jul 13, 2011
I'm quite new to linux but I have configured a simple ftp server and it's working great. I have a FTP-Shared folder with upload and download subfolders. Under upload's and download's I have identical category subfolders like mp3's, movies, software etc. in both. As the guy's upload, I would like to create a line crontab where I can move all the content under /FTP-Shared/upload/mp3/* older than 14 day's to FTP-Shared/downloads/mp3/ recursively (Like in cp command), but the timestamp must be searched on the first directory and not sub files example: /mp3/Club Dance/CD1/Hallo world.mp3This is how far I got:[root@clients ~]# /usr/bin/find /FTP_Shared/upload/Mp3s/ -depth -mindepth 1 -mtime +14 -type d -exec mv -f {} /FTP_Shared/download/Mp3s/ ;This command moves the directory and files, but it is not recursively
View 4 Replies
View Related
Sep 25, 2010
I am trying to use an old box as backup server. I have tried a couple of possibilities along the lines of:
Quote:
rsync -a --delete --progress --log-file=/home/$USER/info.txt -e ssh /home /etc root@192.168.0.106:/mnt/back
The problem is it does not delete files that has been removed from my local system?
I run the command as root on the local system.
(I realize I should properly not ssh into the server as the server's root but I'm having trouble with the permissions and I want to make sure everything else works before messing around with it)
View 2 Replies
View Related
Jul 9, 2011
Ubuntu server recently had issues with a disk. fsck seemed to correct everything, but I have one directory that I can't delete, chown, chgrp, chmod, etc.
Here's the listing for the directory
dr-x-wxrwt 2 16709 25134 8192 2020-08-23 22:34 UDLEDATB.DBF
Note the sticky bit is set and the uid is a number that does not appear in /etc/passwd.
Even as root, any attempt to delete, chmod, chown, etc. gives "Operation not permitted".
Since sticky bit on a directory restricts delete to the owner and the owner is invalid, I am stuck. I need to delete this directory.
How can I fix this?
View 4 Replies
View Related
Feb 11, 2011
If I have a directory /foo with a few files in it, how do I symlink each entry in /foo into /bar/? For instance, if /foo has the files a, b and c, I want to create three symlinks:
/bar/a -> /foo/a
/bar/b -> /foo/b
/bar/c -> /foo/c
View 3 Replies
View Related
Nov 1, 2010
I just can't stand knowing that there's a slight problem with my PC.I have roughly 12.5 Gigs of files, mostly movies that are multiple clones of a particular movie (which was an entirely different problem altogether) and I CANNOT DELETE THESE THINGS! There has to be a simple way to do it from terminal, problem is, I can't seem to find the trash directory in terminal.
View 3 Replies
View Related
Apr 8, 2011
I'm trying to keep a directory full of log files manageable. Nightly, I want to delete all but the 10 most recent. How can I do this in a single command?
View 2 Replies
View Related
Apr 9, 2011
I have a script running as a cronjobIt outputs logs upon each run to /var/log/mylog.logIs there anyway I can delete this or compress it when it gets too large?A cheap and dirty way is to setup another cronjob to delete the log every X interval.... although I'm not sure if that's the proper way
View 3 Replies
View Related
Mar 8, 2011
I would boot up windows and do it but window will no longer open my system crashed and was only able to recover linux. i open up system info and 31 gig of memory are used up on windows. i try to delete them but the option doest pop up and the delete key will not work. how can i remove all the windows files without deleting any of my linux stuff? if its possible.
View 15 Replies
View Related
Apr 28, 2011
i wanna ask on how to delete a file or a certain file in linux by using php or in other word by using web browser. example i want to delete the file inside /var/www/cgi-bin/ with browser.
View 14 Replies
View Related
May 30, 2010
how to delete only files which have no extensions in the directories. but other files should exist.
View 12 Replies
View Related
Feb 10, 2011
What should do? Or how to delete that I have 2 hidden in my PC?
I know nothing that's why please tell me detail if some one know about it?
View 5 Replies
View Related
Feb 10, 2010
Assumed I have the following files:
test12.txt
test13.txt
test14.txt
test15.txt
I want to delete the first 3 files with one command. How to do that?
View 8 Replies
View Related
Apr 14, 2010
i am trying to delete temp files using rm -rf but i am getting this error "bash: /usr/bin/rm: Arg list too long"
View 11 Replies
View Related