Linux, what's that all about?

Beekeeping & Apiculture Forum

Help Support Beekeeping & Apiculture Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
What about the non gui stuff vi and shell scripting and the cron and find.

e.g Copy all files in the current directory and its sub directories that begin with a capital letter and were modified yesterday and contain the word funeral

find ./ - type f -mtime 1 -name [A-Z]* -exec grep -i funeral {} \; -exec cp {} /usr/temp/

Glorious! How would you do that in windows?
 
Sorry for the duplication.
Something went wrong. Bloody windows!
 
What about the non gui stuff vi and shell scripting and the cron and find.

e.g Copy all files in the current directory and its sub directories that begin with a capital letter and were modified yesterday and contain the word funeral

find ./ - type f -mtime 1 -name [A-Z]* -exec grep -i funeral {} \; -exec cp {} /usr/temp/

Glorious! How would you do that in windows?

ah now you're talking - and you haven't even mentioned sed and awk. Those were the days - stuck in windows batch files here now :ack2::banghead::cuss:
 
What about the non gui stuff vi and shell scripting and the cron and find.

e.g Copy all files in the current directory and its sub directories that begin with a capital letter and were modified yesterday and contain the word funeral

find ./ - type f -mtime 1 -name [A-Z]* -exec grep -i funeral {} \; -exec cp {} /usr/temp/

Glorious! How would you do that in windows?
Much as I hate to defend Windows - to be fair I have never wanted to do that.....

It is quite easy to come up with examples of abstract things X can do but Y can't.

In *nix how would you pick multiple files (based on random things you remember while looking at the list) and then unselect a few when you changed your mind about them.... before copying them to another directory.

*nix = Well you couldn't...
Windows = A few clicks (using ctrl key) then drag-and-drop...

ah now you're talking - and you haven't even mentioned sed and awk. Those were the days - stuck in windows batch files here now :ack2::banghead::cuss:

I enjoy getting stuck in cmd/bat files every now and then.... admittedly the FOR command syntax gets me confused every time!!!
 
tell you what, if we think the gaps/no gaps argument (sorry discussion ;)) has been heated on here let's not even start a win/unix discussion :willy_nilly::willy_nilly:
 
Operating systems are sort of like beekeeping - get more than two programmers/operators together and you will have a discussion about which OS is best...
 
Much as I hate to defend Windows - to be fair I have never wanted to do that.....

It is quite easy to come up with examples of abstract things X can do but Y can't.

In *nix how would you pick multiple files (based on random things you remember while looking at the list) and then unselect a few when you changed your mind about them.... before copying them to another directory.

*nix = Well you couldn't...
Windows = A few clicks (using ctrl key) then drag-and-drop...



I enjoy getting stuck in cmd/bat files every now and then.... admittedly the FOR command syntax gets me confused every time!!!



Ah well, I used that example as I had to do something similar not long ago.
A system had unknowingly been down for a couple of days and all the spool files that had not been processed by the system had to be isolated, so that they could be passed in again. The find statement I used was a bit like my find example. There were about 5000 matching files by the way out of lots ( (above the limit of ls whatever that is)

as for your example:
I'd do the following:
ls -l > myfile
vi myfile
(j down, k up, dd to delete a line) Then delete all the lines I dont want
!]]cut -c 65- gives me just the file nameshe
:g/^/s//cp / Inserts "cp " at the start of every line
:g/$/s// \/usr\/temp\/ appends /usr/temp/ to every line

Then exit vi and run it

. ./myfile

Thanks. I enjoyed that!



vi myfile
 
Stuff about vi!!!!

My example said then change your mind about a few....
how do you undo the dd bit?

To be fair what I would probably do (to do what you needed to do) would be very similar...
dir /s/a-d > out.txt
possibly with some sort parameters.

I wouldn't *rse about in edlin though (although I could) - I'd squirt/parse it into excel and then use data filter to "hide" what I didn't want then concatenate the required syntax.

Or (if I knew the criteria) I could knock up a bat/cmd file to work its way through.......

I think the thing is "techies" can achieve all sorts with the tools at their disposal....
Your "average" computer user doesn't know (or want to know) abstract OS commands so even if they kew the ls (or dir) command they wouldn't know all the parameters/options or "understand" how they could be used...

CAVEAT - I think the "average" *nix user is probably more "techie" than the "average" Windows user......
I wouldn't argue that "any" MS product was ever best of breed* but they are defacto-standards (for what ever reason)

*
Lotus 123 was (arguably) "better" than excel
Wordperfect or AMI-Pro were (pretty indisputably) better than Word
Harvard plus several others were better than PowerPoint
Pretty much "any" of the main DBase offerings were better than Access
etc etc.

We will have to swap war stories sometime (I can hark back to DOS 3ish, GEM, VM/SP (CMS & CP), MVS OS/390, REXX, CList JCL etc etc).
 
I dont really think Unix is better in all respects. More fun though and less irritating. The thing I hate most about windows is it slows drastically/hangs for no apparent reason with all sorts of applications. I also really get frustrated about the current trend for VMs and VPCs. Windows is crap enough without running it within itself!
 
Oh I also hate Vis Studio as it helps programmers produce really poor software very quickly.
 
Oh I also hate Vis Studio as it helps programmers produce really poor software very quickly.

As someone who makes my living doing Configuration Management any tool that hides stuff in its own labyrinth to deliberately obscure its workings is BAD!!

And any tool enabling monkeys to "write" applications without even a basic understanding of the underlying principals is worse!!

Oh and PDF files

Not sure whats wrong with PDF files though ;)
 
Drew Not sure whats wrong with PDF files though ;)[/QUOTE said:
Too complex. Much bigger than other image files. Really difficult to process programatically because there are lots of ways to achieve the same thing. You need acrobat reader and then you get upgrades every bleedin week. And yet, they are becoming the de facto standard.
 
Too complex. Much bigger than other image files. Really difficult to process programatically because there are lots of ways to achieve the same thing. You need acrobat reader and then you get upgrades every bleedin week. And yet, they are becoming the de facto standard.

Ahhhhh I see where you are coming from....
From my side - I write stuff in Word et al.
I then cram it into a pdf and "publish"/distribute it.
The PDF is (to all intents and purposes) Read Only - so I know "they" can't be mucking about with it. You won't believe how many people think its a good idea to edit Word documents without going through Doc Management process....
<aside>
Well obviously you will believe......
</aside>
 
too many 'cowboys' out there
 
It all started here

01001000 01100101 01101100 01101100 01101111 00100000 01110111 01101111 01110010 01101100 01100100

:sifone:
 
PDF's are editable with the right software. <G>

Just that not a lot of people think about it like that. Just as editable as a text document.

Baggy (who comes from a dos background)
 
PDF's are editable with the right software. <G>

Just that not a lot of people think about it like that. Just as editable as a text document.

Baggy (who comes from a dos background)

The right software is the key thing....
I work at big corporates... and Word et al are standard S/W literally everyone has it.
Acrobat or indeed anyother PDF editing software are much less common ergo "R/O (to all intents and purposes)".

Most numpties that "overwrite" my definitive published document do it accidently because they add some notes or whatever and then File>Save not as a malicious act......... Then they do a deliberate change and the garbage gets swallowed without trace and "published"....
As we know when reviewers review the new version they often will only read the expected changes.......

And don't get me started on "Versioning"..........
 

Latest posts

Back
Top