Reputation
4,147
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
12 35
Newest
 Yearling
Impact
~733k people reached

Mar
12
comment Deleting all files in a folder except files X, Y, and Z
If you have three files a, b and a b the first program will delete - if you put ab into the grep part: "^[ab]$" a and b but not a b, just opposed to your intentions. The second command will do the same. And the third too. You shouldn't use 'ls' in scripts, with very, very rare exceptions. Just don't do it.
Mar
12
comment Deleting all files in a folder except files X, Y, and Z
Since folders under Unix are files (anything is a file), that's maybe what is intended. The question explicitly says: "I have a lot of files and folders in a specific folder and I want to delete all of them; " - and if you like to exclude Y, maybe you know whether Y is a directory or not.
Mar
11
comment Compare files that are in directory 1 but not directory 2?
Yes, it isn't d2/f but d2/f . Tabs and newlines in filenames are rare, but allowed.
Mar
11
revised Compare files that are in directory 1 but not directory 2?
working in all aspects now
Mar
11
comment Compare files that are in directory 1 but not directory 2?
So effectively you don't have any concrete example?
Mar
11
comment Compare files that are in directory 1 but not directory 2?
@geekosaur: you might have noticed that I use test together with find. Which program would you expect to fail when invoked with 'find' and why?
Mar
11
revised Compare files that are in directory 1 but not directory 2?
now calling test without bash
Mar
11
comment Compare files that are in directory 1 but not directory 2?
You should test your program with a file called "d2/f ". Rule of thumb: Nearly never use ls in scripts.
Mar
11
awarded  Editor
Mar
11
revised Compare files that are in directory 1 but not directory 2?
explaining the find command
Mar
11
comment Compare files that are in directory 1 but not directory 2?
Not with find, do I?
Mar
11
comment Compare files that are in directory 1 but not directory 2?
ls will come with all problems with white space, tabs, linefeeds, backspaces and such in filenames.
Mar
11
comment Please recommend a GUI telnet client
Usage of telnet is strongly discouraged. Having said that, of course, there are some appliances out there which just speak telnet, and not ssh. Then use two xterms, one with telnet, one with man-telnet. Or xterm:telnet + firefox:telnet-help
Mar
11
answered Compare files that are in directory 1 but not directory 2?
Mar
11
answered Compare files that are in directory 1 but not directory 2?
Mar
8
comment Why do /usr and /tmp directories for Linux miss vowels in their spellings?
I heared /usr stands for unix system ressources, not user. But I too heard that it is another myth. :) I don't have evidence.
Mar
7
comment Why do /usr and /tmp directories for Linux miss vowels in their spellings?
I have never written or inspected a filesystem in depth, but does the name of a file/directory in the filesystem occupy more or less space, depending on 1 character? The files themselves always occupy a multiple of some size - today 4k. So most files which contain a path to /usr or /tmp will not effectively get smaller or bigger, depending on a single e. Well - sometimes they will, and then they grow for a whole blocksize, but rarely. And in RAM? I don't know.
Mar
6
comment Why do /usr and /tmp directories for Linux miss vowels in their spellings?
I don't buy mmory nd dsk spc, but slow tltyps. As long s you cn dcphr th cronyms - why not?
Mar
5
comment gnu find and masking the {} for some shells - which?
@geekosaur: Can you say which specific csh-version on which specific platform? I would prefer to test it myself (if it is possible on linux) or be assured, that the person testet it himself.
Mar
5
comment gnu find and masking the {} for some shells - which?
No. I'm in a debate with a guy who says, that in our wiki we should give the advice to use "{}" all the time, because the man page says so. And now I would like to know if there is a shell I'm not using, like ksh, zsh, tcsh, csh or XYZsh which I don't know, for which this claim is true, or whether I honestly can assume, that there isn't. If there are shells for different Unixes which need the "{}", that would be a fine explanation why the sentence is still in the man page, but not appropriate as advice for linux beginners.