Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Choadmaster
Oct 7, 2004

I don't care how snug they fit, you're nuts!

Ice posted:

Not sure if this is the right place to post this but here goes:

So instead of : "rm -r ./*"
I typed: "rm -r /*"

It asked for a few confirmations, which I gave, before I figured out my mistake, and stopped. Everything seems to be working fine, but I wondered if there was any way to check and see if I deleted any system OS files, and maybe recover them. I'm on a 2014 macbook pro.
Thanks

Christ, "rm -r *" next time.

I believe it works alphabetically so it would have gone after your Applications folder first. Assuming that's not gone, all you have to do is check your applications. No guarantees though, I've never done that.

Adbot
ADBOT LOVES YOU

DigitalRaven
Oct 9, 2012




If you didn't do it with sudo, you're better off because you only have permissions to delete your own poo poo. If you did do it with sudo, you've probably hosed some things in /Applications at the very least. As you didn't use -f, you'll have got a confirmation for every file that you didn't already have write permission to that it tried to delete, only the ones you a) confirmed and b) didn't get "Permission Denied" for will be gone.

e: If you've not deleted anything else, run find / -type d -mtime -1 > modified_folders.txt to find everything that's been deleted, but you'll need recovery software to get it back.

DigitalRaven fucked around with this message at 11:30 on Mar 2, 2015

Ice
May 29, 2014
Thanks all, looks like it got rid of Adobe Reader but that's it. Lesson learned.

Housh
Jul 9, 2001




VNC is exactly what I need. Thanks for the recommendation. It works like magic.

Accipiter
Jan 24, 2004

SINATRA.

Ice posted:

Thanks all, looks like it got rid of Adobe Reader but that's it. Lesson learned.

Lesson being, don't gently caress around in a terminal when you don't know what you're doing.

Ice
May 29, 2014
How else you gonna learn, if not by loving around?

Comatoast
Aug 1, 2003

by Fluffdaddy

Ice posted:

How else you gonna learn, if not by loving around?

Agreed. The lesson is to doublecheck yourself before entering commands. I like to do the third check, which is humbly called "the idiot check."

devilmouse
Mar 26, 2004

It's just like real life.
I've had these aliases since I started using Unix back in like '94 or something.

alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'

That way you can either suffer through hitting y, y, y to confirm or do a "\rm blah" to skip it.

Pivo
Aug 20, 2004


code:
alias such=git 
alias very=git 
alias wow='git status' 

$ wow 
$ such commit 
$ very push
also http://www.cyberciti.biz/tips/displays-animations-when-accidentally-you-type-sl-instead-of-ls.html

DigitalRaven
Oct 9, 2012




For those who keep forgetting to sudo:

alias gently caress='sudo $(fc -ln -1)'

devtesla
Jan 2, 2012


Grimey Drawer

Ice posted:

Thanks all, looks like it got rid of Adobe Reader but that's it. Lesson learned.

It did you a favor

phosdex
Dec 16, 2005

I just got a 10.10.3 public beta signup email.
https://appleseed.apple.com/sp/betaprogram/guide

Brotato Broth
Feb 21, 2012
I'm having absolutely zero luck trying to start a Jack server. It seems to recognize the driver but hangs at "waiting for signals," like so:

code:
39380 waiting for signals
load = 0.0689 max usecs: 4.000, spare = 2898.000
load = 0.1034 max usecs: 4.000, spare = 2898.000
load = 0.1206 max usecs: 4.000, spare = 2898.000
...
Breaking out of it gives me this:

code:
^C
jack main caught signal 2
starting server engine shutdown
poll failed (Bad file descriptor)
I have it installed via Homebrew, if it's of any import.

Accipiter
Jan 24, 2004

SINATRA.

Ice posted:

How else you gonna learn, if not by loving around?

The thing "asked for a few confirmations" which he blindly agreed to. Each one of those should have been a teacher.

Brotato Broth posted:

I'm having absolutely zero luck trying to start a Jack server. It seems to recognize the driver but hangs at "waiting for signals," like so:

code:
39380 waiting for signals
load = 0.0689 max usecs: 4.000, spare = 2898.000
load = 0.1034 max usecs: 4.000, spare = 2898.000
load = 0.1206 max usecs: 4.000, spare = 2898.000
...

Seems to me, "waiting for signals" means the server is running. Seems like it's working fine.

somuch_gravy
Oct 25, 2014

this place is good and not bad
Hey all, if this is the wrong place to post asking about a problem I've been troubleshooting for a bit, then I'm a jerk. I think it may be on the software side, but I understand there could be a number of problems.
I've had a macbook for a few months (i7, 8gb RAM, 1TB HDD, most current model, ya'll feel me) and I've been running it into my TV as a mirror display since I've had it. The TV is a 40" LED HD Element(cheap) from Target about two years ago. Anyhow I've been using an HDMI cable with the thungerbolt moshi adapter from apple and everything's been fine up until now.
Since about two nights ago when I plug my laptop into the tv with hopes to display as a mirror, the projection appears fine on the tv, but my macbook screen seems compressed. It's as if the my laptop's monitor becomes "widescreen" and it displays inch wide black bars across the top and bottom of the display. If I mess with the resolution a bit I can get it to fit my macbook's screen, but end up with a compressed/cropped image on the tv screen.
I'm especially partial to screen mirroring for whatever reason, so while I understand that I could use the tv as an extended monitor as a workaround, there's a number of other issues I'd have to resolve (like a gray bar running across my full screen VLC video)
The only reason this concerns me in the first place is because up until now the display fit perfectly on both screens simultaneously. If anyone has any ideas for a fix or has had any issues similar and could give me any advice I would greatly appreciate it. If not please ignore me :D
Also, I apologize for the wall of text, but I wanted to try and explain the issue as best as possible.
Thanks!

Brotato Broth
Feb 21, 2012

Accipiter posted:

Seems to me, "waiting for signals" means the server is running. Seems like it's working fine.

If it's running, moc doesn't seem to recognize it:

code:
$ jackd -d coreaudio & mocp -D
[1] 39802
jackd 0.124.1
...
loading driver ..

Loading plugins from /usr/local/Cellar/moc/2.5.0/lib/moc/decoder_plugins...
Loading plugin libmp3_decoder...
OK
Running the server...

FATAL_ERROR: No valid sound driver!


FATAL_ERROR: Server exited!

Quantum of Phallus
Dec 27, 2010

somuch_gravy posted:

Hey all, if this is the wrong place to post asking about a problem I've been troubleshooting for a bit, then I'm a jerk. I think it may be on the software side, but I understand there could be a number of problems.
I've had a macbook for a few months (i7, 8gb RAM, 1TB HDD, most current model, ya'll feel me) and I've been running it into my TV as a mirror display since I've had it. The TV is a 40" LED HD Element(cheap) from Target about two years ago. Anyhow I've been using an HDMI cable with the thungerbolt moshi adapter from apple and everything's been fine up until now.
Since about two nights ago when I plug my laptop into the tv with hopes to display as a mirror, the projection appears fine on the tv, but my macbook screen seems compressed. It's as if the my laptop's monitor becomes "widescreen" and it displays inch wide black bars across the top and bottom of the display. If I mess with the resolution a bit I can get it to fit my macbook's screen, but end up with a compressed/cropped image on the tv screen.
I'm especially partial to screen mirroring for whatever reason, so while I understand that I could use the tv as an extended monitor as a workaround, there's a number of other issues I'd have to resolve (like a gray bar running across my full screen VLC video)
The only reason this concerns me in the first place is because up until now the display fit perfectly on both screens simultaneously. If anyone has any ideas for a fix or has had any issues similar and could give me any advice I would greatly appreciate it. If not please ignore me :D
Also, I apologize for the wall of text, but I wanted to try and explain the issue as best as possible.
Thanks!

Did you try turning on and off the option for "scale best for display" or whatever it's called ?

Happy Noodle Boy
Jul 3, 2002


phosdex posted:

I just got a 10.10.3 public beta signup email.
https://appleseed.apple.com/sp/betaprogram/guide

Oh man, I'd love to jump in on this but I'm afraid of it loving things up. I've been waiting for Photos since iOS8 came out. This at least reminds me I need to bump up my iCloud storage so my library fits.

Happy Noodle Boy fucked around with this message at 03:41 on Mar 4, 2015

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Brotato Broth posted:

I'm having absolutely zero luck trying to start a Jack server. It seems to recognize the driver but hangs at "waiting for signals," like so:

code:
39380 waiting for signals
load = 0.0689 max usecs: 4.000, spare = 2898.000
load = 0.1034 max usecs: 4.000, spare = 2898.000
load = 0.1206 max usecs: 4.000, spare = 2898.000
...
Breaking out of it gives me this:

code:
^C
jack main caught signal 2
starting server engine shutdown
poll failed (Bad file descriptor)
I have it installed via Homebrew, if it's of any import.

I can't help with that, but what are you trying to achieve and could the same thing be done using Audio Hijack?

Ice
May 29, 2014

Accipiter posted:

The thing "asked for a few confirmations" which he blindly agreed to. Each one of those should have been a teacher.

Admittedly a bone-headed move. In my defense, I was deleting a directory full of git repos, and was expecting a bunch of confirmations.
On a somewhat related note, has anyone tried using this?:

https://github.com/andreafrancia/trash-cli

I just installed it, and it seems to be working pretty well so far. I'm surprised that there's no native functionality that does this. Or is there?

Zenostein
Aug 16, 2008

:h::h::h:Alhamdulillah-chan:h::h::h:
mv * ~/.Trash

Just checked and it works in leopard, at least.

Ice
May 29, 2014
Is there an easy way to restore stuff from the command line?, or do you have to remember where it comes from and use mv again?

Ice
May 29, 2014
Also, I just tried that, and it seems like the "put back" option isn't there when you click on such an item in the trash bin.

Pivo
Aug 20, 2004


Think that only works when Finder does it, because the original location is stored in .DS_Store. brew install trash, that one will use Finder to Trash files.

But really, stop being pussies and say what you *really* mean instead of relying on 'Trash'. Psh. If you must, alias rm to rm -i or echo or something so that you have to \rm to REALLY do it.

Brotato Broth
Feb 21, 2012

~Coxy posted:

I can't help with that, but what are you trying to achieve and could the same thing be done using Audio Hijack?

I'm doing it just so I can run moc, really.

somuch_gravy
Oct 25, 2014

this place is good and not bad

Quantum of Phallus posted:

Did you try turning on and off the option for "scale best for display" or whatever it's called ?

Yeah, I've messed around with all different resolutions settings to try and get it back to the way it was working before. I've cleared PRAM, booted in safe mode, tried to verify my disk. Pretty much anything that would come up after googling my problem. The thing I've noticed is, the same problem occurs when I'm using the external display and running my windows partition.
The HDMI cable is fine. I was able to test it on my roomates laptop (Asus, windows 8) and everything displayed fine on both ends. This would lead me to believe that the issue is either with my moshi adapter or with the actual displayport on my macbook.

edit/p.s really dig your avatar

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost
I remove the rm aliases on new systems I get interactive logins to because I've learned to mostly use rm in scripts and to avoid deleting files just on a whim. Most of my file deletions for day to day stuff on my desktop is with a GUI. For my servers, I use Chef or a well-tested bash script to do maintenance tasks. Oh, and for one-off deletions I usually run an ls first then rm afterward if there's any globs involved. Haven't had an "oops" rm moment for... about ten years now. I do, however, have issues getting mv and cp right with trailing slashes like with rsync due to tab completion sometimes adding the slash. Never really bothered to remember the rules and just leave it off explicitly.

Lawen
Aug 7, 2000

DigitalRaven posted:

For those who keep forgetting to sudo:

alias gently caress='sudo $(fc -ln -1)'

You can actually do the same thing without an alias using the "!!" built in to repeat the previous command:

$ rm -r ./*
Insufficient Permission
$ sudo !!
sudo rm -r ./*
Password:

(Phone posting but you get the idea)

Tippis
Mar 21, 2008

It's yet another day in the wasteland.

Lawen posted:

You can actually do the same thing without an alias using the "!!" built in to repeat the previous command:

$ rm -r ./*
Insufficient Permission
$ sudo !!
sudo rm -r ./*
Password:

(Phone posting but you get the idea)

Wouldn't it be semantically and aesthetically more correct to alias that part then?

$ rm -r ./*
Insufficient Permission
$ doit !!
sudo rm -r ./*
Password:

DigitalRaven
Oct 9, 2012




Lawen posted:

You can actually do the same thing without an alias using the "!!" built in to repeat the previous command:

$ rm -r ./*
Insufficient Permission
$ sudo !!
sudo rm -r ./*
Password:

(Phone posting but you get the idea)

Well, yes. But the alias I posted works across shells, rather than relying on a bashism (it kinda works in zsh but requires hitting return an extra time and I'm impatient).

% rm -r ./*
Insufficient Permission
% gently caress
sudo rm -r ./*
Password:


Tippis posted:

Wouldn't it be semantically and aesthetically more correct to alias that part then?

Why? At that point all you're aliasing is sudo itself.

Lawen
Aug 7, 2000

DigitalRaven posted:

Well, yes. But the alias I posted works across shells, rather than relying on a bashism (it kinda works in zsh but requires hitting return an extra time and I'm impatient).

% rm -r ./*
Insufficient Permission
% gently caress
sudo rm -r ./*
Password:



Fair enough, I was just throwing out the shell expansion trick as an FYI. !! is awfully useful if you're on a remote or unfamiliar system and don't want to take the time to download your custom rc.

You're right that it's a bit annoying to have to hit return a second time in ZSH. It bugged me when I first switched to ZSH but now I kinda like it since it gives me a chance to double-check and verify that I'm running the command I'm intending to.

Tippis
Mar 21, 2008

It's yet another day in the wasteland.

DigitalRaven posted:

Why? At that point all you're aliasing is sudo itself.

So you can yell “do it!” at the computer, obviously. :v:

DigitalRaven
Oct 9, 2012




Tippis posted:

So you can yell “do it!” at the computer, obviously. :v:

I prefer a command history that contains every element of Scottish punctuation. :colbert:

Choadmaster
Oct 7, 2004

I don't care how snug they fit, you're nuts!

Lawen posted:

You can actually do the same thing without an alias using the "!!" built in to repeat the previous command:

$ rm -r ./*
Insufficient Permission
$ sudo !!
sudo rm -r ./*
Password:

(Phone posting but you get the idea)

Why does everyone seem to use ./* when just plain old solo * is equivalent, simpler, and doesn't run the risk of the typo that started this whole subthread? I must be missing something.

withak
Jan 15, 2003


Fun Shoe
The potential for the typo adds some spice to your day-to-day routine.

mdemone
Mar 14, 2001

I think it ought to be a built-in behavior that whenever it sees "rm /*" it says Nope, Cannot Do That.

Why even allow the possibility? Would that command ever actually be useful?

Cingulate
Oct 23, 2012

by Fluffdaddy

Choadmaster posted:

Why does everyone seem to use ./* when just plain old solo * is equivalent, simpler, and doesn't run the risk of the typo that started this whole subthread? I must be missing something.
Maybe because "rm *" is mentally translated as "DELETE EVERYTHING!!!!", which intuitively sounds bad, and "rm ./*" intuitively has a more restricted scope.

Rubiks Pubes
Dec 5, 2003

I wanted to be a neo deconstructivist, but Mom wouldn't let me.
Any reason why I shouldn't move my old iPhoto library to an external disk or something now that I have the Photos app?

Sprat Sandwich
Mar 20, 2009

Rubiks Pubes posted:

Any reason why I shouldn't move my old iPhoto library to an external disk or something now that I have the Photos app?

Your iPhoto library is now just hard links to the new one anyway.

Adbot
ADBOT LOVES YOU

Cyrano4747
Sep 25, 2006

Yes, I know I'm old, get off my fucking lawn so I can yell at these clouds.

How does the photo library handle stuff that is located on removable drives?

Here's the basic situation: I have a poo poo ton of personal photos that just stay on my computer. No biggie, I really don't give a poo poo about how those are organized behind the scenes as long s I can find what I want when I want.

On the other hand I also have something like 200gb of photos of old documents. Most of them have long since been stitched into .pdfs and I've got my own, separate way of organizing those, but I keep the originals around on a few external HDs* just because a lot of time and money went into generating them all plus once in a blue moon I'll need the original high-res photo of one particular page for this reason or that.

Up until now I've simply kept them sequestered from my other photos and just search the drives by the file name on the rare occasions I need to refer back to them. But, if the new app plays nice with removable media I also wouldn't mind indexing them and just keeping them as a separate album or whatever the reasonable in-app division would be.




*before someone gives me a lecture about media backup it's two identical drives, one of which is stored with some other crap I can't fit into my current living situation. It's a temporary solution to a temporary situation

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply