Tag Info

Hot answers tagged

69

Try -m for --mirror wget -m ftp://username:password@ip.of.old.host


31

How deep do your subdirectories go? /var/log/basedir/*.log /var/log/basedir/*/*.log { daily rotate 5 } Will rotate all .log files in basedir/ as well as all .log files in any direct child of basedir. If you also need to go 1 level deeper just add another /var/log/basedir/*/*/*.log until you have each level covered. This can be tested by using a ...


22


10

rm -r /path/to/directory/* or rm -rv /path/to/directory/* if you want to see what is happening.


9

find dir/ -path '*/.svn' -prune -o -type f -print should fit the bill (mostly comes from the find manpage for -path). Pipe it to less and check it out. What it does is first find (path ends in .svn and don't recurse into (prune) this directory) or (if it's a file, print it). If it looks good, change it to find dir/ -path '*/.svn' -prune -o -type f ...


7

find . -type d -perm 777 -exec chmod 755 {} \; (for changing the directory permission) find . -type f -perm 777 -exec chmod 644 {} \; (for changing the file permission) If they did not have 777 permissions, we easily remove the -perm 777 part.


7

You would need to run 2 commands I believe. This is one way to do it: # find . -mindepth 1 -type d | xargs chmod 700 # find . -mindepth 2 | xargs chmod 700 The first does directories at the current directory level and deeper. The second does all files and directories deeper than the current directory.


6

What about simply find . -type d | grep -v '.svn'


6

What about the -path option to find? find . -type d ! -path '*.svn*'


6

find is your friend. I reckon the following ought to do it: find <target_dir> -not -name \*.bz2 -exec bzip2 \{\} \; i.e. if the dir where the files you want to bzip are is /var/log/blah it would be: find /var/log/blah -not -name \*.bz2 -exec bzip2 \{\} \;


6

Yes, it can, if the underlying CPUs support the latest virtualization extensions (Intel VT-X/EPT) and if you're using the latest VMware products (Workstation 8, ESXi 5). The relevant settings in your VM should be as follows: monitor.virtual_mmu = "hardware" monitor.virtual_exec = "hardware" vhv.enable = "TRUE" hypervisor.cpuid.v0 = "FALSE" The first ...


6

Directly: No, an error is returned that A group cannot be a member of itself Indirectly: There is nothing preventing this from happening in Active Directory, and is known as Circular Group Nesting.


5

Per Zoredache... why not: find /foo/temp_folders/ -type f -iname * -exec rm {} + Edit: changed the trailing \; to + for performance as noted here


5

So, in order to curb everyone joking around, here's a serious answer: To do something recursively in this context means to apply whatever it is that you're doing to all the children of the object you're applying it to. So, doing chown $HOME takes ownership of your home folder, but only the home folder, nothing inside it. Doing chown -R $HOME (note the ...


5

No you don't need to have recursion on for authoritative DNS servers. Depending on who you ask it's even considered good practice that (if possible) your authoritative server not be recursive as it's a line of defence against some DoS attacks. (Cisco's document is here for example) A sample from my domain is below (Server is running Bind 9 and is ...


5

besides wget, you may also use lftp in script mode. the following command will mirror the content of a given remote FTP directory into the given local directory, and can be put into the cron job: lftp -c 'open <hostname>; user <username> <password>; mirror -e <remote-src-path> <local-dest-path>; quit' it automatically handler ...


5

You can use 'curlftpfs - mount a ftp host as a local directory' and, once mounted, you can use normal file tools like 'cp -r'.


4

You're modifying inodes and not files, it should be fairly quick. Last time I did that it took under a minute on our old LTSP boxen. You've made a bunches of changes already if it worked at all. But it's generally a bad idea to do such indiscriminate changes. Update based on the comments: @wombats You need to set up another directory on the box, set up a ...


3

Regardless of the permissions: chmod -R a=r,a+X,u+w /your/path


3

Wow... that's pretty bad... The best thing you can do now is back up your personal data and reinstall your system. Since that's probably not what you wanted to hear, the second best (and probably substantially more painful) thing to do is something like: for package in `dpkg -l | awk '{print $2}'`; do apt-get install --reinstall $package done Note ...


3

This will change the permissions of every directory in the current directory and all files and folders within them, I think that's what you want but be careful because of the recursion... find . -maxdepth 1 -type d -exec chmod -R 700 {} \;


3

You may use find for this or maybe, with a loop, for: for directory in parent/*; do if [ -d $directory ]; then chmod -R 700 $directory; fi ;done


2

Dreamhost uses powerdns (ugh), just as bad .. but Windows recursive resolvers do indeed suck. The question is , why are the Windows dns boxes at your client sites getting SERVFAIL? They shouldnt be. And, the above poster is correct - if you're authoritative to a domain, you can have it cname, A, fail, you name it, to any domain/ip (you don't have to know ...


2

Authoritative servers should NOT be configured to offer recursive service. Not even to work around a potential Microsoft bug. I can't quote chapter and verse at the moment (if I find it I'll update). However this is very much the accepted "best common practise" for operation of DNS servers. If some resolver in your lookup chain is returning SERVFAIL then ...


2

Use -m rather than -r, because of the recursion depth. http://www.editcorp.com/Personal/Lars_Appel/wget/wget_2.html#SEC11


2

Should work try: wget -r ftp://ftp:ftp@ftp.sunet.se/tst/


2

Chaos -- You are incorrect in your concern that rm will ever delete .. I did a quick search and found the man pages to rm from the 7th edition unix manual at http://plan9.bell-labs.com/7thEdMan/vol1/man1.bun where it says: DIAGNOSTICS Generally self-explanatory. It is forbidden to remove the file .. merely to avoid the antisocial consequences ...


2

I can understand if you're trying to dump this into cron or something, but why not simply ftp into the server with your normal client and mget *? This might be a quicker path to success.



Only top voted, non community-wiki answers of a minimum length are eligible