General :: Prevent Rmdir -p From Traversing Above Certain Directory
Apr 22, 2010
I hacked together this script to rsync some files over ssh. The --remove-source-files option of rsync seems to remove the files it transfers, which is what I want. However, I also want the directories those files are placed in to be gone as well. The current part of the find command, -exec rmdir -p {} ; tries to remove the parent directory (in this case, /srv/torrents), but fails because it doesn't have the right permissions. What I'd like to do is stop rmdir from traversing above the directory find is run in, or find another solution to get rid of all the empty folders. I've thought of using some kind of loop with find and running rmdir without the -p switch, but I thought it wouldn't work out. Essentially, is there an alternative way to remove all the empty directories under the parent directory?
[code]....
View 2 Replies
ADVERTISEMENT
Jun 7, 2011
After creating directory (DirName) in media/ directory, i wanted to remove it, so i used the rmdir command, "rmdir media/DirName". but now, i have mounting problem, i can't mount media disk, cd and dvd disk. how to recover settings and restore it?
View 3 Replies
View Related
Jul 8, 2010
I have a box with multiple users on it and I want everyone to be able to have full access to their home folders, but not be able to see the contents of /home/ or another user's home folder (I.E. bob has full access to /home/bob but cannot access or even see the contents of /home/john)Right now users can see other user's home folders but can't modify what's inside. How do I prevent them from seeing the contents at all?
View 1 Replies
View Related
May 3, 2011
I have, for example, a folder called "MyFolder" and it contains 3 files: MyFile1, MyFile2, MyFile3. The only file that I do NOT want a particular user/group to even see that it exists is, for exmple, MyFile2.So, when they do a directory listing on MyFolder, they should only see MyFile1 and MyFile3. How can this be done in Linux? The important thing is that it is not just preventing them from "executing" MyFile2, but to prevent them from even knowing that it exists by not including it in a directory listing.This is a simpified example using one file, but in reality, I have lots of files and some of those that I want to block are also subfolders.It is very important for me to hide the existence of certain files/folders when the user does a directory listing. It's also important that the files stay in their current folder (that is, I can't use a workaround which requires moving all the files into a separate folder and then securing that folder).
View 4 Replies
View Related
Jan 19, 2011
I would like to complete inode information from the struct list_head structure of super block structure of vfs.System call are doing operation internally, but no system call to traverse?
View 1 Replies
View Related
Jan 11, 2010
Im trying to delete a folder from the terminal named iTunes Music but it thinks im trying to del a folder called iTunes and one called Music. How can i del this file from the terminal?
View 5 Replies
View Related
Apr 6, 2010
Actually I'm not sure that it's swapping like mad: I've done more testing and it looks like there may some interference causing the noise that may be correlating with network usage. I'm accessing a MacMini (with MacOS X 10.4) from my Linux machine using VNC. My Linux machine has 4 GB of ram and I run a lot of various apps on it and I've got no issue at all. It's all snappy and don't hear the hard disk swapping/read/writing too often. Now with VNC, the hard disk is swapping like mad. When I'm moving things on the OS X desktop. So I was thinking of creating a ramdisk and forcing the temp VNC files to go into that ramdisk but the problem is I can't find any temp files.
I've attempted to do that:
#!/bin/bash
while [ true ]
do
lsof | grep vnc
done
The VNC version I'm using is this one:
$ vncviewer -version
VNC Viewer Free Edition 4.1.1 for X - built Jan 30 2009 19:33:16
Copyright (C) 2002-2005 RealVNC Ltd.
No matter how much data is coming from the Mac, there should be plenty of memory (4 GB of ram) so there's really no reason to swap like crazy.
View 1 Replies
View Related
Jan 9, 2010
My linux prevent CDs autorun! i wanna know what to do?
View 1 Replies
View Related
Jul 11, 2010
I'm currently copying a large number of files over a network. To monitor progress, I tried running watch du. However, the output never changed (or not much, not sure). find . -type f | wc -l always gives me the same number of files as does ls -R. It seems, these programs use caching, which is, in general, a good thing. Does anyone know, though, how cache usage could be controlled? I'm on an Archlinux system and I'm working on an ext4 fs on an encrypted hd.
View 4 Replies
View Related
Jan 28, 2011
How to change this sequence to, for example "Ctrl+Fn+F1" or temporarily disable it?@related: How to send Ctrl+Alt+F1 to window (to switch terminal remotely, not locally)?
View 1 Replies
View Related
Mar 17, 2011
I am running a shell script from a rc file in Linux. The shell script is going into a loop which runs for 8 hours. Now I want to prevent the shell script from running when Linux boots or I need to find a way to kill the shell script when it is running. I tried using killall, kill $! and Ctrl+C etc. Nothing seems to work. Can you suggest a way out. I am new to Linux.
View 2 Replies
View Related
Jul 7, 2011
I have synergyc process that starts at boot. How do I prevent this process from starting? I've searched /etc, /etc/init.d for some configs or scripts but found nothing.
View 2 Replies
View Related
Jul 30, 2011
I want2 know that how stop move folder on samba share.
View 1 Replies
View Related
May 17, 2010
I just read the Linux scp command issue question and it reminded me that I regularily forget to specify the colon in the host part of a scp command, and thus copying a file locally instead of copying to a remote host, e.g. I do
scp foo host
instead of
scp foo host:
But I never use scp to copy a file locally. So I wonder if there is a way to make scp fail if both (the source and destination) arguments refer to local files.
View 1 Replies
View Related
Jul 23, 2010
Okay, this issue is kinda difficult to understand without context: When we run Evince, it checks if there is any other instance running. If there is one, the evince command exits immediately, right after passing the parameter to the running instance If no other instance is running, a new one will be started, and the evince command will wait until this new instance exits. While that behavior is quite nice, it is not helpful for shell scripts. Why? Because I have a script that writes a temporary .ps file, calls a PS/PDF viewer, and automatically deletes the temporary .ps file after the viewer exits. Unfortunately, this script only works if evince was not previously running (if evince was running, then the file is deleted too fast).
I don't want to add extra complexity to this script. It should be kept simple, because I may want to replace evince with xpdf, gv, or anything else. I was expecting some kind of command-line parameter to evince (similar to -f to vim and gvim), but I fear there is no such option. Writing a wrapper script around evince might be a good solution, but this script should work correctly in all cases (if evince was running and if it wasn't).
View 1 Replies
View Related
Feb 9, 2011
Is it possible to prevent a specific program (i.e. rhythmbox and its dependencies) from ever swapping to disk?I'm asking because I have a problem when a music player hiccups whenever Chromium hogs too much memory. Is there a way to work around this? This isn't a problem in Windows anymore so presumably there is a way.
View 3 Replies
View Related
Jun 20, 2011
If I copy text into the xterm clipboard from vim, it is cleared when I exit vim. How do I prevent this?
View 1 Replies
View Related
Jan 10, 2011
I want to prevent "^C" from echoing when Ctrl-C is pressed. I did "stty -echoctl" which some googling results suggested. Now it echos raw Ctrl-C characters instead of the string "^C". That's not any better since it displays some funny blocked hexadecimal in the terminal window.
View 8 Replies
View Related
Jun 29, 2011
I use software where I have to edit a text file in order to get my custom needs from it. Problem is that when the author puts out an update, it always overwrites my changes and I have to spend hours trying to compare the file, re-edit my changes back in, etc. This happens sometimes as often as once per month.
I've wondered if there might be a linux tool or commands which would look through the new file, then at my old file, changing only the text which already exists while not breaking anything else. Most software authors seem to know how to do this but since mine doesn't, how can I accomplish this on my own?
View 7 Replies
View Related
Sep 7, 2010
how to disable displaying image on web browsers. Example I have a link [URL].
- when I connect to this link on my browser, it will not display the image
- But I can use <img src="/img/test.jpg" to websites can read it.
View 9 Replies
View Related
Feb 10, 2011
What is the least painful way to temporarily prevent uploads to an FTP server by certain accounts? they all only upload directly to their home directory setup in /etc/password
View 1 Replies
View Related
Apr 1, 2010
Code:
#!/bin/bash
ulimit -c unlimited
while true; do ./executeable; done
When i will write this in console it will run executeable file and it will generate report : core.pid after crash so i can gdb the report. The application after crash will restart how can i prevent restarting the application after it's crash?
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
May 11, 2010
Is it possible to limit maximum volume in PulseAudio? Currently, PulseAudio sets PCM channel too loud which results in distorted sound. I use aumix to turn volume down, but whenever any other sound is played (IM notification etc), PA plays with knobs, turning master volume down and PCM up. code...
I use OpenSUSE 11.2, pulseaudio 0.9.21, ALSA 1.0.21 and ALC889A sound codec.
View 1 Replies
View Related
May 19, 2010
I'm running Ubuntu 9.04 and I have the window manager configured for "focus follows mouse" but new application windows will steal the focus. Seems like there are many threads out there complaining about this behavior, but I see no solutions, am I missing something?
View 2 Replies
View Related
Jun 23, 2010
Ubuntu 10.04
Under Preferences > Power Management I have changed the settings to never put the computer to sleep and never to put the display to sleep.
My display still goes to sleep and I am prompted for my password when I leave the computer unattended.
I would like to be able to hit the "Lock Screen" app I added to the top panel to lock my screen, but otherwise I would like it to just stay on.
View 1 Replies
View Related
Oct 4, 2010
I am using gpg keys with passphrases set to connect to different jabber accounts. When I restore from hibernate I am prompted by two pinentry dialogs for these passphrases. But very often one of these dialogs that is not in focus steals keyboard input from the other dialog. Even worse, they steal keyboard input from fluxbox and other applications and I am unable to do anything until I enter it or click cancel if I do not want to input password right now. How can I forbid pinentry to steal keyboard input and to get it only if it is in focus? I am using pinentry-0.8.0 on Gentoo amd64 with USE="ncurses qt4" (/usr/bin/pinentry is a symlink pointing to pinentry-qt4).UPDATE:After some research, I found that pinentry accepts --no-global-grab option, which, according to the info page, should be used only by developers. Still unsure how to make it default: having#!/bin/zshexec /usr/bin/pinentry-qt4 --no-global-grab $@in place of /usr/bin/pinentry symlink does not work (this script is launched, but option is ignored), if I place it into /usr/local/bin it is not launched at all though I have /usr/local/bin in $PATH before /usr/bin.
View 1 Replies
View Related
Feb 10, 2011
what if the root user by mistakenly stops/starts any service and tried to remove those traces from the log files and save those log files. Then how can we ensure that our log file is trusted. Is there any way where even the root(superuser) also cant edit/modify the contents of the /var/log/* files.
View 2 Replies
View Related
Apr 6, 2011
I apologize if this is the wrong place to ask, or if this has been asked before, but it has been bugging me for some time and I have not had any luck with it. I imagine that my problem is not unique to my circumstances, but here goes.I am running Arch Linux, and quite frequently watch videos, particularly flash, in fullscreen. However, eventually, the screensaver appears, and starts dimming the screen. I have the screensaver set to run whenever the computer is 'idle'. Does anyone know a way to either.Stop the screensaver from appearing when in a flash video or watching other video?Stop the screensaver from appearing when a flash video or normal video is full-screened? Heck, even..Let the screensaver know that my machine is not idle when watching flash.
View 1 Replies
View Related