Reputation
3,518
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
2 18 38
Newest
 Yearling
Impact
~230k people reached

Apr
26
awarded  Yearling
Apr
6
awarded  Notable Question
Apr
3
awarded  Nice Question
Mar
24
reviewed Approve How can I activate extra-verbose mode (debugging mode) during Debian boot?
Mar
24
reviewed Approve How can I activate extra-verbose mode (debugging mode) during Debian boot?
Mar
24
reviewed Approve Unix “ls” command?
Mar
24
reviewed Approve Linux Audio Spectrum Analyser
Mar
24
reviewed Approve What does [vmuser@localhost ~]$ mean?
Mar
13
awarded  Civic Duty
Feb
27
revised How to send keystrokes (F5) from terminal to a process?
adapt to argument name change (--window instead of --windowid)
Feb
11
revised Remove all files/directories except for one file
added matteos comment
Feb
11
comment Remove all files/directories except for one file
Yes, this is a common problem. See the options -print0 in find and -0 in xargs. Here is a workaround, but is is slightly inconvenient. find . -maxdepth 1 -type f | grep -v 'a b' | tr '\n' '\0' | xargs -0 rm. By the way, gnu parallel handles this well (I almost always use it as a substitute for xargs: ls | grep -v 'a b' | parallel rm
Feb
8
comment Remove all files/directories except for one file
Ciao @Matteo, it works for files with spaces too, but you need to surround the grep-pattern by quotes, e.g. ls | grep -v "a file with spaces.bin" | xargs rm. This is normal grep syntax.
Jan
28
reviewed Approve Invoke Syscalls from Java
Jan
28
reviewed Approve Can I install Ubuntu into a RPi2 remotely?
Jan
2
reviewed Approve WRITE SAME manually zero
Dec
27
reviewed Approve Get package sources and repository link
Dec
21
reviewed Approve How can I write to the Buzz controllers HID device created by hid-sony.c to work the LEDs?
Dec
10
awarded  Popular Question
Nov
4
reviewed Approve GNU screen split: how to show active pane in caption