Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Console / shell tips & tricks
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 14, 15, 16  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Jul 19, 2016 6:12 pm    Post subject: Reply with quote

JohnBlbec wrote:
khayyam wrote:
Code:
% echo $SHELL
/bin/zsh
% du -sh *(/)

... sorry, no "glob qualifiers" for you dear bash user ;)

Code:
$ echo $SHELL
/bin/bash
$ du -sh */

:-)

JohnBlbec ... which, as far as I know, is the only bash glob qualifier ... whereas zsh offers:

# -- introduce glob flag
% -- device files
) -- end of qualifiers
* -- executable plain files
+ -- + command name
- -- follow symlinks toggle
. -- plain files
/ -- directories
: -- modifier
= -- sockets
@ -- symbolic links
A -- group-readable
D -- glob dots
E -- group-executable
F -- non-empty directories
G -- owned by EGID
I -- group-writeable
L -- + size
M -- mark directories
N -- use NULL_GLOB
O -- + sort order, down
P -- prepend word
R -- world-readable
S -- setgid
T -- mark types
U -- owned by EUID
W -- world-writeable
X -- world-executable
Y -- + at most ARG matches
[ -- + range of files
^ -- negate qualifiers
a -- + access time
c -- + inode change time
d -- + device
e -- execute code
f -- + access rights
g -- + owning group
l -- + link count
m -- + modification time
n -- numeric glob sort
o -- + sort order, up
p -- named pipes (FIFOs)
r -- owner-readable
s -- setuid
t -- sticky bit set
u -- + owning user
w -- owner-writeable
x -- owner-executable

... all of which can be combined, eg (directories modified today):

Code:
% du -hs *(/Mm0)
420K    tmp/

or, similarly ...

Code:
% print -rl *(/Mf:u+rx,o-x:)
bin/
dict/
doc/
downloads/
mail/
man/
media/
misc/
perl5/
src/
test/
tmp/

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 14, 15, 16
Page 16 of 16

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum