Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Whee, Linux!

This thread is locked; no one can reply to it. rss feed Print
Whee, Linux!
Thomas Fjellstrom
Member #476
June 2000
avatar

Trezker said:

Sometimes I think Ubuntu does that too.

But thats what Ubuntu is for.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Karadoc ~~
Member #2,749
September 2002
avatar

Tobias, I'm interested to know what kind of scripts you find useful in *nix but can't do in Windows. I think it's widely agreed that *nix has a superior set of terminal commands, but I don't really miss that in Windows.

-----------

Tobias Dammers
Member #2,604
August 2002
avatar

Some examples.

  • I have a number of programming projects I work on, and most of them are under version control. The mercurial ones have copies on two machines and a backup on an external HDD. I have a script that pushes them all from one machine to the other and to the hdd.

  • I have a few web projects on a shared host, with no shell access (just FTP). The local development versions use a slightly different folder structure, different configuration files, and contain a lot of files I don't want on the web server (version control files, unused graphics, code documentation, helper code like code generators, etc.). I have written a simple deployment script that prepares a 'publish' folder holding the web project in the exact structure I want on the web server, and then copies it through FTP. I have done the same in windows, sans the FTP upload, and then used filezilla to do the copying. It works, but it requires 4 extra actions (fire up filezilla, navigate to the correct folders, start transfer, quite filezilla), and manually navigating to the correct folders introduces a possible source of errors.

  • To connect to my machine at work, I need to select the correct VPN settings, connect to the VPN, and then open an RDP session. When I'm done, I want the VPN connection to be closed and the VPN settings reset. Again, one command. Windows equivalent: Start a virtual machine (because the VPN client apparently f*cks up my windows install, making it reboot randomly), inside the VM start VPN client, connect to VPN through GUI, enter VPN password, wait for VPN to connect, double-click RDP icon on desktop.

It's not that these things are completely impossible in Windows. It's just that I can shape my Linux install to make them much more convenient.

Trezker said:

Sometimes I think Ubuntu does that too.

Of course it does, provided you use the tools that try to be like windows. Those aren't any better than the windows equivalents; in fact, I've noticed that they're often less efficient at doing the things I don't need.
I use apt-get rather than aptitude or synaptic - not because it's prettier, and neither because it does a better job at installing programs (it doesn't, since it uses the exact same back-end), but because it does exactly what I tell it to (install a program and its dependencies) and not a thing more (load and display a sorted list of all available and installed packages, graphically tagged with an icon indicating their status, etc. etc.).
To move files around, I usually use the command line. I don't need a file browser that gives me preview icons and other eye candy but makes me wait a second or more when I step into a large folder - windows explorer does it, but nautilus is no better. It becomes even worse when deleting large amounts of files. Yesterday at work, I deleted ~10k files, and windows had me waiting several minutes before even starting to delete stuff.

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

miran
Member #2,407
June 2002

Yesterday at work, I deleted ~10k files, and windows had me waiting several minutes before even starting to delete stuff.

Just last week I had to delete about 45k files from c:\windows\temp using explorer. I think it took at least 15 minutes for explorer just to count the files. I wonder if typing del * in cmd works any faster...

--
sig used to be here

Tobias Dammers
Member #2,604
August 2002
avatar

I'd assume del *.* to be faster, just like rm -r is faster than nautilus.

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Arthur Kalliokoski
Second in Command
February 2005
avatar

miran said:

I think it took at least 15 minutes for explorer just to count the files.

Did it show a dialog for how many files?

{"name":"estimation.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/a\/cad29b6d418b577671c7570d693e7aca.png","w":297,"h":335,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/a\/cad29b6d418b577671c7570d693e7aca"}estimation.png

They all watch too much MSNBC... they get ideas.

bamccaig
Member #7,536
July 2006
avatar

I use apt-get rather than aptitude or synaptic - not because it's prettier, and neither because it does a better job at installing programs (it doesn't, since it uses the exact same back-end), but because it does exactly what I tell it to (install a program and its dependencies) and not a thing more (load and display a sorted list of all available and installed packages, graphically tagged with an icon indicating their status, etc. etc.).

I'm not a Debian expert, but I think you might be confusing aptitude with something else. AFAIK, aptitude is just another command interface and I don't think it wastes too much time. I was under the impression that it is just a front-end over apt-get and I think it's supposed to be "smarter" when resolving dependencies, etc. I could be wrong.

miran said:

I wonder if typing del * in cmd works any faster...

It does. I use the command line for most things in Windows too because the GUI is slow (and that's when it doesn't hang). `del` and `rmdir /s /q` are a lot faster than Windows Explorer. Cygwin is even faster still, but it doesn't work so well with network shares so I don't recommend you interact with those using Cygwin. :P MSYS might have similar performance improvements over the Windows equivalents without conflicting with network shares. I'm not sure.

Thomas Fjellstrom
Member #476
June 2000
avatar

bamccaig said:

I'm not a Debian expert, but I think you might be confusing aptitude with something else. AFAIK, aptitude is just another command interface and I don't think it wastes too much time. I was under the impression that it is just a front-end over apt-get and I think it's supposed to be "smarter" when resolving dependencies, etc. I could be wrong.

aptitude is indeed smarter. a lot smarter. And it may confuse some people when it's dependency resolution stuff pops up problems. also people might not expect or want it to install "recommended" or "suggested" packages either, but thankfully that bit is optional.

If you use sid, you absolutely NEED aptitude though. apt-get is just too dumb to work day to day.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Karadoc ~~
Member #2,749
September 2002
avatar

I have not had issues with the speed of the Windows GUI, deleting/moving/browsing files, for as long as I remember. So it's somewhat surprising to me that there are a couple of you talking about it.
Well, now that I think about it, if I want to know the size of a big directory, such as the Windows directory then it takes a little while to add up all the files. But that's only a few seconds — certainly not minutes. (The Windows directory has 67,438 files on this computer.)

-----------

Trezker
Member #1,739
December 2001
avatar

He mentioned synaptic, which is a graphical package manager.
Just started it up here, it sure takes a while to start.

It's not like Ubuntu has removed aptitude or apt-get. And even synaptic isn't aimed for the less technical people.
I think what Ubuntu wants people to use first is their Software center where you get applications and games. I don't think the software center lists all the little packages that a programmer would be interested in.

Tobias Dammers
Member #2,604
August 2002
avatar

bamccaig said:

I'm not a Debian expert, but I think you might be confusing aptitude with something else. AFAIK, aptitude is just another command interface and I don't think it wastes too much time. I was under the impression that it is just a front-end over apt-get and I think it's supposed to be "smarter" when resolving dependencies, etc. I could be wrong.

OK, I was mainly aiming at synaptic. Aptitude is overkill for my needs right now, but I'd probably use it over synaptic when the need arises.
And I'd take either over the windows way of doing things.

I have not had issues with the speed of the Windows GUI, deleting/moving/browsing files, for as long as I remember. So it's somewhat surprising to me that there are a couple of you talking about it.
Well, now that I think about it, if I want to know the size of a big directory, such as the Windows directory then it takes a little while to add up all the files. But that's only a few seconds — certainly not minutes. (The Windows directory has 67,438 files on this computer.)

You should try deleting 20 gigabytes of data spread over 100k files in a folder hierarchy 4 levels deep with 50 folders at the top level over a network share. I'm not making this up, this is a real-world example.

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Matthew Leverton
Supreme Loser
January 1999
avatar

This week was Me vs a bootable software RAID5. I finally prevailed. :-*

Now I can finally reinstall Windows 7 on my spare 1TB drives. It's not like I have any reason to boot up into it. I never thought I'd see that day. I think it means I'm officially an old fart. :'(

Trent Gamblin
Member #261
April 2000
avatar

It means you're a Linux hippie.

/leaves humming "Join us now and share the software, you'll beee freee hackers..."

Matthew Leverton
Supreme Loser
January 1999
avatar

There are plenty of things that I hate about Linux, but I suppose I hate most things about most things. >:(

One thing that I really like is that I can reinstall a Linux system and be up and running within 15 minutes. (Super thought: I should export the list of installed packages the next time I reinstall, and then paste that back into one big apt-get install line...)

In Windows it's a pain in the butt to reinstall all the software, one slow install wizard at a time. :-[

Trent Gamblin
Member #261
April 2000
avatar

That's true. But I never bother reinstalling windows. My Vista box has been running the same vista install for years now. And it's still running perfectly, not slow and bogged down as some people seem to experience with Windows. It's actually my first Windows box, because I used to be a huge Linux zealot after using DOS for a while. It's nice to have Linux around too, though I mainly use it on my server. I don't want to choose between Linux, Windows, and OS X. I want them all (and I have all 3 on my macbook, which is very convenient).

MiquelFire
Member #3,110
January 2003
avatar

The more you uninstall, the slower Windows can get.

Also installing crap. That's very easy to do on Windows.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Thomas Fjellstrom
Member #476
June 2000
avatar

Matthew's statement that he'd like to save a list of installed packages got me thinking.

You don't want a list of ALL the installed packages, just the ones that were manually installed (ie: not installed as a pre-requisite to some other package).

So I googled and found this little tid-bit:

aptitude search '~i!~E' | egrep -v "(i A|id)" | cut -d " " -f 4

That'll list only manually installed packages that aren't about to be removed. If you want to include those too, just change the egrep to `grep -v "i A"`.

. Aptitude is overkill for my needs right now, but I'd probably use it over synaptic when the need arises.

Do what I do, and never use aptitude's curses interface. I use the CLI interface.

aptitude update
aptitude dist-upgrade
aptitude install foo

Thats about it for most of my uses ;D

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Tobias Dammers
Member #2,604
August 2002
avatar

Also installing crap. That's very easy to do on Windows.

Yes. Because there's such a metric fuckload of it.

Do what I do, and never use aptitude's curses interface. I use the CLI interface.

Dammit, I didn't even know aptitude had a CLI interface. I always assumed it were a curses front-end over apt-get and apt-cache. Silly me.

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Thomas Fjellstrom
Member #476
June 2000
avatar

Dammit, I didn't even know aptitude had a CLI interface. I always assumed it were a curses front-end over apt-get and apt-cache. Silly me.

For a long time, so did I. Once I found it, I was like "hallelujah".

It actually re-implements a lot of what apt-get does. But it does what apt-get does, better. At least if you can figure out the conflict resolution prompts. Many times the first option is what you want, but if the first option it gives happens to remove half your system to do it, I suggest doing one of two things:

1. look ahead at the next few possibilities it gives, if you see one that just keeps a few packages as their current version, thats typically the way you want to go.

2. cancel whatever it was you were doing and wait till the problem clears up.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Michael Faerber
Member #4,800
July 2004
avatar

One thing that I really like is that I can reinstall a Linux system and be up and running within 15 minutes. (Super thought: I should export the list of installed packages the next time I reinstall, and then paste that back into one big apt-get install line...)

That's what I always do:
apt-get install `cat packages`

I have also tried the command Thomas found, but it has the disadvantage of showing all installed packages, possibly leading to unwanted package installations (or incompatibilities) when you try to install the exported package list on a new version of Ubuntu/Debian. Right now I maintain my own package file manually, entering every application into it myself.

--
"The basic of informatics is Microsoft Office." - An informatics teacher in our school
"Do you know Linux?" "Linux? Isn't that something for visually impaired people?"

Thomas Fjellstrom
Member #476
June 2000
avatar

I have also tried the command Thomas found, but it has the disadvantage of showing all installed packages

It doesn't though. It ONLY shows manually installed packages.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730



Go to: