Re: chmod feature request: setting different modes for files and directories

2009-08-11 Thread Pádraig Brady
Tobia Conforto wrote: Dear coreutils maintainers, I'd like to ask for an often needed feature of chmod: the ability to set different modes for files and directories. I will briefly explain the need, and then propose a possible syntax. current: find some/path -type d -exec chmod g+s {} +

Re: chmod feature request: setting different modes for files and directories

2009-08-11 Thread Andreas Schwab
Pádraig Brady p...@draigbrady.com writes: Tobia Conforto wrote: The same is true when someone extracts some files from an archive or copies them over a removable media, where permissions need to be reset to something sane, like 755/644: current: chmod -R 755 another/path; find

[PATCH] ls: Use pretty UTF-8 arrow when showing where symlinks point to

2009-08-11 Thread Lennart Poettering
[Second version of the patch, makes this feature optional with --fancy-chars] Diego Pettenò complained that ls -l doesn't use the UTF-8 arrow character to show where symlinks point to. This tiny patch fixes that. With this applied the character is used when the CODESET is UTF-8 otherwise we fall

Re: [PATCH] ls: Use pretty UTF-8 arrow when showing where symlinks point to

2009-08-11 Thread Pádraig Brady
Lennart Poettering wrote: [Second version of the patch, makes this feature optional with --fancy-chars] --fancy-chars :) I'm not sure how serious this patch is. How about: alias lsf='ls -l --color | sed s/ - / $(tput bold)\u25aa\u25b6$(tput sgr0) /' cheers, Pádraig. p.s. this chunk is far too

Too powerful rmdir

2009-08-11 Thread zhoulai...@melix
Hello, I suppose this is a designing issue or a bug: You can remove an empty directory as you like, even if you don't have the right to read, write nor execute: f...@ubuntu:~/Unix_Tutorial_8/5$ mkdir test f...@ubuntu:~/Unix_Tutorial_8/5$ ls -l total 4 drwxr-xr-x 2 fu fu 4096 2009-08-12 06:39

Re: [PATCH] ls: Use pretty UTF-8 arrow when showing where symlinks point to

2009-08-11 Thread Lennart Poettering
On Tue, 11.08.09 22:27, Pádraig Brady (p...@draigbrady.com) wrote: this is equivalent I think: static const char *arrow = - ; #ifdef HAVE_NL_LANGINFO if (fancy_chars STREQ (nl_langinfo (CODESET), UTF-8)) arrow = \xe2\x86\x92 ; #endif DIRED_FPUTS_LITERAL

Re: Too powerful rmdir

2009-08-11 Thread Bob Proulx
zhoulai...@melix wrote: I suppose this is a designing issue or a bug: Thanks for the report. But the behavior you describe is not a bug but simply a misunderstanding. You can remove an empty directory as you like, even if you don't have the right to read, write nor execute: The permissions