Reputation
Next tag badge:
972/1000 score
232/200 answers
Badges
14 128 265
Impact
~3.7m people reached

Apr
2
comment How to get new created (not change or modified), & removed files in last 24 hours
On Linux, the creation date (whatever that means) is stored on most modern native file systems, but (with the possible exception of some Suse based systems), there's no kernel API to retrieve it so those %w of GNU stat won't work.
Apr
2
comment How to get new created (not change or modified), & removed files in last 24 hours
The OP didn't mention Linux (though he referred to GNU stat). FreeBSD/OS/X find have -Bmin, -Btime, -Bnewer to act on birth time.
Apr
1
revised Is there a way to grep a folder and show all lines containing non-ascii characters?
typo
Apr
1
revised Is there a way to grep a folder and show all lines containing non-ascii characters?
typo
Apr
1
comment What does the “-y” do in “yum -y groupinstall gnome”?
Ever heard of the man command? It can come handy at times.
Apr
1
comment How to conditionally do something if a command succeeded or failed
That works but is convoluted. You're running ping in a subshell of a subshell, the output of ping is captured in view of running it as a command. But because the output is redirected to /dev/null that will always be the empty string. So you're running nothing in a subshell, which means the previous exit status (of the command substitution subshell, that is of ping) will be retained. Obviously, the correct way is if ping ...; then here.
Apr
1
comment How do I use man pages to learn how to use commands?
And don't use that command which is dangerous, inefficient and unreliable.
Apr
1
comment Where is “export var=value” not available?
@jrw32982, because it's a builtin. You still get that in modern POSIX shells but only for special builtins which export is.
Apr
1
comment grep or find a pattern in all directories
Yes, I've just double checked those -r/-R were added in 5.3
Apr
1
revised grep or find a pattern in all directories
added 92 characters in body
Apr
1
comment grep or find a pattern in all directories
What version of AIX?
Apr
1
revised Exclude directories in locate search
The OP actually wanted to _exclude_ directories.
Apr
1
comment grep or find a pattern in all directories
For your penance, can you please go and double-check if AIX's grep -R searches in fifos, devices or the target of symlinks? mkdir X; ln -s /etc/issue X/a; mkfifo X/b; grep -R . X and see if it hangs or matches on /etc/issue.
Apr
1
comment grep or find a pattern in all directories
Did you not ask that same question just 3 weeks ago? What's wrong with the answers you got there? What version of AIX are you using?
Apr
1
revised grep or find a pattern in all directories
added 672 characters in body
Apr
1
comment grep or find a pattern in all directories
Having options after arguments is a GNUism and will typically not fork in non-GNU systems like the OP's AIX. Also note that the meaning of -r/-R is reversed between GNU and AIX greps. You command may not work if there are file names that start with -. It will also exclude hidden files and dirs in the current directory, but not in sub-directories.
Apr
1
answered grep or find a pattern in all directories
Apr
1
revised How can I skip empty files with sed?
fixed quoting an expr nonsense.
Apr
1
revised Is there `find`'s `-exec` like option in `ack-grep`?
It's --null for GNU and FreeBSD grep. Adding guard agains filenames starting with -
Apr
1
revised Is there `find`'s `-exec` like option in `ack-grep`?
Avoid running rm if no file is found. Need -- as ack doesn't add the ./ prefox.