General :: Rm: Cannot Remove Directory `directotyname'
Apr 18, 2011
i have a hacking attack on my server where some one tried to implement shell and scripts,
also in a directory he placed a symbolic link to my root. i tried to remove it with rm directotyname but it gave me :
> rm directotyname
rm: cannot remove directory `directotyname': Is a directory
how can i remove the symbolic link and make sure it will not happen again ?
View 5 Replies
ADVERTISEMENT
May 13, 2011
I have udev rules that creates a directory for each usb-media that is plugged into my debian to automount usb-media. This directory where mount-points (the mount-directories) are created is passed through a rdp-connection with rdesktop. On our terminalserver there's a drive Z that shows all mount-points with content of usb-media.When users remove usb-media, udev unmounts usb-media and tries to delete the directory that was used to mount usb-media.If the users hasn't closed explorer showing any subfolder of usb-media, the unmount-command succeeds but the rmdir-command fails because the ressource is "busy or used".My question: how can I force to delete this mountpoint? (rmdir doesn't have force and rm -rf doesn't work)Edit: I should add, that I can't use third-party software or additional packages because the linux-machine is a thin-client with very low disk-space.
View 1 Replies
View Related
Feb 21, 2010
ubuntu@ubuntu:/usr/lib/locale$ sudo rm -R nl_NL.utf8 rm: cannot remove directory `nl_NL.utf8': Input/output error I'm having problems deleting a seemingly corrupted directory to allow for a reconfiguration of this locale, but the OS doesn't let me do it. Why?
View 2 Replies
View Related
Jan 17, 2010
I'm trying to tar a collection of files in a directory called 'my_directory' and remove the originals by using the command:
tar -cvf files.tar my_directory --remove-files
However it is only removing the individual files inside the directory and not the directory itself (which is what I specified in the command). What am I missing here?
View 3 Replies
View Related
Nov 17, 2009
How do I remove the noexec from the tmp directory, temporarily?
View 3 Replies
View Related
Feb 24, 2011
I have a folder with many many files. e.g html, docs, excel sheet, script etc.
Now I want to find {using grep command}a certain word in that folder/directory and delete it in all the files and scripts that have it.
For example, I want to delete the word /testing (with the slash) in all files in a directory.
View 14 Replies
View Related
Sep 14, 2010
I have a WD external disk, NTFS file system. I mounted it on my Red Hat. While on the external disk, I deleted a directory, which was sent to .Trash-root of that disk.I went to .Trash-root and did rm -rf to completely delete that directory, but I got the following error: cannot remove `<directory>': Input/output errorWhen I do ls -la on that directory that I wish to remove, it shows me it has 0 files inside. But not only I can't remove it, I can't do anything else with it (copy, etc). And I have all the rights on that directory, so this isn't the problem.
View 6 Replies
View Related
Jun 28, 2010
I would like to create a cronjob that will delete all files within a directory 1 hours after it is created to the folderI found this cron find /path/to/file/* -ctime +1 -exec rm {} ; but it's deleted all files.I want to make an exception, all file should be deleted except one file (letsay file a.zip)
View 16 Replies
View Related
Feb 11, 2010
I'm able to use the following to remove the target directory and recursively all of its subdirectories and contents. find '/target/directory/' -type d -name '*' -print0 | xargs -0 rm -rf
However, I do not want the target directory to be removed. How can I remove just the files in the target, the subdirectories, and their contents?
View 4 Replies
View Related
Dec 2, 2010
how to write a script so that when I use the 'del' command it removes/sends the files / folders to a I specify for example 'dustbin'
View 1 Replies
View Related
Oct 19, 2009
how do i remove it?
View 4 Replies
View Related
Jul 7, 2010
I have two questions:How do I remove files from Directory A if their name appears in Directory B?How do I move foo.jpg and bar.jpg from Directory C to Directory D if and only if foo.png and bar.png appear in Directory D?I suspect there's probably a bash one-liner for this, but...I can't come up with it.
View 5 Replies
View Related
Jul 7, 2011
I want to remove the index.html file alone in the every directory via bash script, for example i have 5 directories in the path /var/www/vhost
anish
kumar
linux
question
friend
each directories have index.html file now i want to replace the index.html file alone from the other directory /var/tmp/vhosbak
anish
kumar
linux
question
friend
How we can do this using script?
View 5 Replies
View Related
May 10, 2011
I Downloaded tomcat6 core and uncompressed using the tar utility and the result was apache-tomcat-6.0.32.Now want to remove it.When going through the Graphical mode to the Downloads directory and try to delete it it says permission denied.When trying to use the rmdir command as root the message is that the directory is not empty.How to remove a directory which has many files in it from the command line or through the graphical mode to which normally the message you get is permission denied ?
View 6 Replies
View Related
Jan 31, 2010
I am still a novice with Ubuntu and I am trying to write a shell script which will clean redundant files. I am stuck with one line where I would need a command which will remove all files from directory except some of them. Can anyone please advice how to add such an exception to the rm command? I have searched some bash shell tutorials, however, no joy. Guess I have overlooked something.
View 9 Replies
View Related
Apr 8, 2010
I was preparing a script which will remove all my files from directory which are 24 hour old.I tried some thing like thisfind . ( -name 'log.*' -mtime +1 ) -exec rm {}; but it is throughing error like : missing argument to exec.
View 8 Replies
View Related
Jan 23, 2010
A Javascript has crept into all my hmtl, php files in my shared hosting account. I have SSH access.How can I use sed to remove that line from all files in a directory recursively ?sed doesnt change the original file.And I need to specify *.php and *.html
View 4 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
Oct 4, 2010
For no known reason there are a few subdirectories added to my Gnome - Locations - menu.
Both the traditional panel menu and the new - computer - menu
In the - computer - menu there is a option to remove items but this does not work.
Is there any way to remove those subdirectories from the menu list. Or/and where can I find that list to edit this manually. (Menueditor alacarte does not edit locations and system). (Suse 11.1)
View 2 Replies
View Related
Sep 28, 2010
I don't have anything on the desktop but it won't let me delete this folder, and if I sudo rmdir it it just comes back.
View 5 Replies
View Related
Apr 6, 2011
I have several copies of a file set with different organizational structures, but the same files. i.e.
On client1 files can be found in ~foobarfile1, ~foobarfile2, ~foo-avernfile3, ~foo avernfile4
On client2 files can be found in ~foo-barfile1, ~foo-barfile2, ~foo-tavernfile5, ~foo avernfile6
On client3 files can be found in ~file1, ~file3, ~file5, ~file7
I have access to one client and the server where I'd like all the files to be synced. I'm not worried about conflicts, just having a complete copy of all files[1-7]. Is there a way to cause RSYNC to remove the directory structure, so that I get something like:
client1% rsync files server:backup
client2% rsync files server:backup
etc
where at the destination all files will be checked against the destination set regardless of the source directory structure?
View 4 Replies
View Related
Jun 15, 2010
I installed pure-ftpd over ubuntu 10.04.
I want to know how can I remove authentication from ftp server to access in ftp directory from browser.
View 3 Replies
View Related
May 22, 2010
I've just made a fresh install of Ubuntu 10.04. When I right-click a panel and choose "New Panel", the panel is made, but is not visible. The panel is placed on the left side of the screen, and icons on the desktop is moved to the right. Also windows does not use the full width of the screen when maximized. I've tried to remove the panel configuration in my home directory, logout and login, installing ATI drivers and running a gnome-panel command (from another post on ubuntu forums), but nothing works.
View 2 Replies
View Related
Jun 16, 2010
I am a student studying computer science course.
Well, I am facing problem when doing lab questions.
I must use DLXLinux bundled in Bochs (bochs.sourceforge.net).
I am required to use the /usr/local directory.
In /usr directory, there is no directory named 'local' but there is one thing called 'local@'. So, when I try to use mkdir command to create 'local' directory in /usr , there are error "cannot make directory.....".
Look at my screenshot at [url].
View 9 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
Apr 12, 2010
I've just installed Ubuntu 10.04, trying out linux for the first time. I'm wondering if it's possible to link my documents folder in Ubuntu to my documents folder in Windows, so that when I open the folder in Ubuntu, I am linked to the folder in Windows.
View 1 Replies
View Related
Aug 23, 2011
I'd like to mount the directory /var/www/mysite to the directory /home/daniel/mysite, but also have the user of the mounted files mapped from the original user (www-data) to my own user (daniel). So that the file /var/www/mysite/index.php who's user is www-data will appear in the mounted directory as /home/daniel/mysite/index.php and be owned by daniel - and alternatively, if I create a file /home/daniel/mysite/test.php with my own user, it will be created in the original directory under the user www-data Is it possible? If not, what alternatives do I have so I can use an IDE and still make sure all the files belong to the HTTP server's user?
View 2 Replies
View Related