[Slackbuilds-users] [PATCH] misc/ibus: merge with new template and add kde4 integration

xgizzmo at slackbuilds.org xgizzmo at slackbuilds.org
Sun Jun 6 15:35:49 UTC 2010


On Sunday 06 June 2010 10:34:48 Grissiom wrote:
> On Sun, Jun 6, 2010 at 1:49 PM, JK Wood <joshuakwood at gmail.com> wrote:
> >
> > Permissions.  cp can misbehave where cat won't.
> >
> >
> Hmm, could you give concrete examples? In `info coreutils 'cp invocation'`:
> 
>      In the absence of this option, each destination file is created
>      with the mode bits of the corresponding source file, minus the
>      bits set in the umask and minus the set-user-ID and set-group-ID
>      bits.  *Note File permissions::.
> 
> AFAIK, cat + > will create a file in "default mode", which is masked by
> umask. Originally, umask is set to 022. But who knows what would happen
> after the system run for years? ;-)
> 
> IMHO, cp will preserve file modes in some degree while cp + > will create
> files in "default mode". Feel free to correct me if I have something wrong.
> 

cp preserves some file modes this is bad because it depends on the source 
  file having correct permissions.

# cp test test3
[root at slacker:/home/gizzmo/test]
# ls -l
total 0
-rwxrwxrwx 1 root root 0 2010-06-06 10:59 test
-rwxr-xr-x 1 root root 0 2010-06-06 11:01 test3

cp -a preserves ownership and permissions, this is also bad because it 
  depends on the source file having the correct ownership and permissions.
# cp -a test test5
[root at slacker:/home/gizzmo/test]
# ls -l
total 0
-rwxrwxrwx 1 nobody root 0 2010-06-06 10:59 test
-rwxrwxrwx 1 nobody root 0 2010-06-06 10:59 test5

cp can be made to work as we need it to but it takes a long list of flags
  and in the end works no better than the simple cat something > somewhere.



More information about the SlackBuilds-users mailing list