« first day (1397 days earlier)      last day (3540 days later) » 

11:51 AM
11
Q: Accidentally executed sudo rm /* on a remote server

AntI accidentally executed rm /* while logged in as root in a remote Ubuntu Server and deleted pretty much all bash commands and currently I can neither log in via ssh or ftp to restore the files (and hope for the best). Is there a way to somehow fix this mess, or should I call the datacenter and a...

That doesn't seem like , but I'm not sure what tag to use... Could create , but that might be a little broad.
(Obviously, should be removed, and possibly as well,... but aiming to do only one retag on the question)
 
12:39 PM
@derobert Retagged to and . I think that's the best we can do.
Not sure about but it is a data recovery issue more or less.
 
12:54 PM
"deleted pretty much all bash commands" how he managed to do that?
 
1:12 PM
@Braiam Perhaps /bin was a symlink to /usr/bin or something like that.
 
@Braiam Removed some symlink. Answers suggest one for a library directory.
 
@derobert Wonder what happened to that. There was no followup
 
@FaheemMitha Not sure. User was last seen in 2013, and question was from 2011... so I guess one of those answers helped?
 
I meant how he could delete the bash builtin commands... listens to the sound of his joke flying over @terdon and @derobert's head
 
@terdon BTW, editing the data recovery tag wiki. So far, I have:
> Questions about recovering data. Includes data loss due to hardware failure, software failure, and user or administrator failure (accidental delete).
Thinking of also adding something to add tags relevant to specific failed component, e.g., ext4, mdadm, rm, etc.
 
1:23 PM
@derobert Sounds good.
 
> Questions about recovering data. Includes data loss due to hardware failure, software failure, and user or administrator failure (accidental delete). Please also add tags for the specific things involved, such as "raid", "ext4", "hard-disk", "rm", etc.
 
@derobert markdown doesn't work in the excerpt
 
Yep, I was hoping [tag:foo] would... since it even works in comments... but no, that'd be too useful.
Wonder if there is a feature request on Meta Stack Exchange for that. Bet there is.
BTW: we have and ... but no which'd probably be the better one for all of that.
 
1:42 PM
meta.stackexchange.com/questions/138023/… there is that, but that was a bug report... not sure how I should post a feature request to change it.
 
> status-bydesign
just use /tag like in other tags
 
@Braiam Yep. It's not a bug. But its something they should change. I suspect the way to do it is to write a new question, link to that old one, and then insert argument about why they should change that design. Don't have time for that at the moment, though...
 
2:24 PM
@derobert Or maybe he just reinstalled.
 
That was one of the answers :-P
 
@derobert :-)
 
 
1 hour later…
3:52 PM
BTW: Do any of the 10k folks visit unix.stackexchange.com/tools?tab=delete&daterange=today and review delete votes?
 
4:03 PM
@derobert What can one do about this queue?
 
Add your own deletion or undeletion vote.
 
@derobert needs 1.95k more
 
I'm sure I am doing something stupid, but...
faheem@orwell:~$ perlconsole
Perl Console 0.4
[!] rcfile /home/faheem/.perlconsolerc is not readable
Perl> x = 1;
[!] compilation error: Can't modify constant item in scalar assignment at (eval 3) line 3, at EOF
@Braiam You're an animal.
 
@FaheemMitha: $x = 1;
 
@FaheemMitha ummm, $x = 1; ?
@Gnouc hah, jinx!
 
4:15 PM
Oh, I thought that was a command prompt.
Same error.
Can someone check perlconsole on Debian, please?
wheezy, that is.
 
anthony@Zia:~$ perlconsole
Perl Console 0.4
[!] rcfile /home/anthony/.perlconsolerc is not readable
Perl> $x = 1
[!] compilation error: Global symbol "$x" requires explicit package name at (eval 4) line 3.
... but that's jessie
Perl> my $x = 1
1
so that works.
 
How about my $x =1;
 
@derobert Same version in wheezy
 
@derobert: LOL, why call me jinx?
 
@Gnouc It's a game.
 
A jinx, in popular superstition and folklore, is: A type of curse placed on a person that makes them prey to many minor misfortunes and other forms of bad luck; A person afflicted with a similar curse, who, while not directly subject to a series of misfortunes, seems to attract them to anyone in his vicinity. An object or person that brings bad luck. A penalty that one person can invoke on another when the two of them say the same thing at the same time. The superstition can also be referenced when talking about a future event with too much confidence. A statement such as "We're sure to win the...
@derobert Ok, I'm confused.
 
@FaheemMitha does that my $x = 1 work for you?
 
Should $x = 1 work?
 
In my country, jinx means something bad.
:))
 
4:19 PM
@derobert Yes
 
@FaheemMitha It appears to use strict, so it won't without my.
 
@Gnouc Jinx had multiple meaning. In standard English it means roughly a curse.
 
@Gnouc Yeah, that's most of its meanings. But here somehow it got to also be the interjection you shout after two people say the same thing.
 
Why it is also the name of the children's game, I couldn't tell you.
@derobert Ok. Since I don't know a thing about Perl, I think I will leave it at that.
 
@FaheemMitha Curious... if you don't know a thing about perl, why are you using perlconsole?
 
4:22 PM
@derobert Trying to see how many languages allow a-b as the name of a variable. So far, only CL, though someone said you can force it in Python.
 
@FaheemMitha With the hyphen? That's not allowed in perl. At least not by normal means.
 
@derobert Yes, as I discovered. It isn't allowed in any other imperative language I've checked, either.
 
Though by less-than-normal means, Perl will let you:
Perl> no strict 'refs'; ${'a-b'} = 'value'; ${'a-b'}
"value"
 
Not by itself, though
Perl> ${'a-b'}
[!] Runtime error: Can't use string ("a-b") as a SCALAR ref while "strict refs" in use at (eval 9) line 3.
 
@FaheemMitha That's because of how perlconsole is setting up the environment (that use strict again). That's not the default.
 
4:27 PM
@derobert Oh. Ok, never mind then.
 
anthony@Zia:~$ perl -E '${"a-b"} = "value"; say ${"a-b"}'
value
 
@derobert Wow, I didn't know perl was so chatty.
What is with the references to compilation?
 
@FaheemMitha The 'compilation error'? That's a reference to how the perl interpreter works: it first "compiles" the script (to some internal representation), then runs that internal representation
So, its actually closer to a compiler + a very featurefull VM than a pure interpreter
 
@derobert Byte-compiling like Python? Where is the compiled representation?
 
@FaheemMitha ?
 
4:39 PM
@Braiam That's a compliment. In the vernacular. If you don't know what it means, ignore it.
 
@FaheemMitha It doesn't normally get saved.
 
@derobert Oh. Unlike the Python one.
 
Hello everyone, I feel kind of awkward interjecting into an ongoing conversation but I am wondering if anyone knows about .deb packaging.
 
@Mix999 Did you have a specific question? The #debian-mentors channel on freenode is a more targeted forum, but this is on-topic here too.
 
Yes very specific in fact. I am wondering if there is any way to tag a file as owned my the package but is not intalled with the package, similar to the %ghost directive in RPM packaging
the related question I posted before is here: unix.stackexchange.com/questions/148587/…
 
4:43 PM
@FaheemMitha I think you can see it with perl -Dx, or various modules
 
@derobert ok
 
But my perl isn't build with the debugging feature.
B::Concise or B::Terse will do it
 
@derobert Oh. Debian wheezy?
 
@FaheemMitha Probably isn't build with debug. Jessie isn't.
 
@Mix999 I hadn't seen this question before. But I'm not aware of any such feature.
What is your use case?
@derobert You're running Jessie?
 
4:45 PM
@FaheemMitha well, mix of testing & unstable
anthony@Zia:~$ perl -MO=Terse -E '$x = 1; say $x+$x'
LISTOP (0xabe7c0) leave [1]
    OP (0xabe550) enter
    COP (0xa1a900) nextstate
    BINOP (0xa1a990) sassign
        SVOP (0xa1a9d8) const [5] IV (0xbe5ff0) 1
        UNOP (0xa1aa18) null [15]
            PADOP (0xa1aa58) gvsv  GV (0xbe6050) *x
    COP (0xabe598) nextstate
    LISTOP (0xabe630) say
        OP (0xabe5f8) pushmark
        BINOP (0xabe678) add [4]
            UNOP (0xabe740) null [15]
                PADOP (0xabe780) gvsv  GV (0xbe6050) *x
 
@Mix999 Specifying what you are trying to do is always a good idea. There might be a better (or alternative) way to do it.
@derobert What is that? Machine code?
 
@FaheemMitha This is basically for programs that produce specific output files that should be owned by the package. These files should not be updated during installs or updates and should only be removed with a purge of the package
 
@FaheemMitha That's a dump of generated bytecode
 
@Mix999 Hmm, I see.
@derobert oh
@Mix999 specific example?
 
find . -name "*txt" -exec echo -n -e {}"\0" \; | du -hc --files0-from=- vs find . -name "*txt" -print0 | du -hc --files0-from=- | tail -n 1
 
4:48 PM
@Mix999 btw, crossposting is frowned on here:
0
Q: RPM “ghost” directive equivalent in debianackaging?

Mix999So I have worked with RPM (Redhat package manager) and it has a feature called ghost files. This type of file designates a file that is owned by the package, but is not necessarily installed through the installation process (useful for files that the program generates after it runs). More about t...

The question is, which one should be closed?
 
@FaheemMitha I don't really have any specific examples that I can post right now because this is not for any of my scripts, but for scripts for the team im working with. Also thank you, I did not know that that is frowned upon. Thank you for letting me know.
I can delete the question on the ubuntu board if you like,
 
@Mix999 if you need RPM vs DEB packaging comparison I recommend leaving the one here and deleting the other, I for one don't know what is ghost
 
@Mix999 surprisingly, i can find no discussion of this online.
 
but people here know about RPM's
 
@Mix999 Yes, given a choice between AU and here for this question, I definitely recommend here. I'm not even sure it is on-topic for AU.
 
4:52 PM
@Braiam alright thanks,
 
@Mix999 you might want to try the IRC channel I mentioned earlier.
 
@FaheemMitha yea i searched about a feature like this literally everywhere before asking on here. There is very little good information about packaging it seems
 
How long has this rpm feature existed?
@Mix999 information about what packaging?
Debian has reasonable documentation, but I've never heard of a feature like that. Doesn't mean you can't emulate it, but nothing springs to mind.
@derobert @Braiam what do you think?
 
> I for one don't know what is ghost
 
@FaheemMitha I believe it has been there for a while. Please note I am VERY new to linux and unix and only started learning about it 2 months ago. By information about packaging I mean a general comprehensive tutorial or full information about what packaging is, what it does, and how it works. As a newcomer it took me weeks to get the general idea of it
 
4:56 PM
@Mix999 RPM packaging, Debian packaging, or both?
 
Information about the %ghost directive in RPM, its documented here
http://www.rpm.org/max-rpm-snapshot/s1-rpm-inside-files-list-directives.html
@FaheemMitha I found that in both. I just mean that the learning curve is extremely steep due to scattered and very technical docementation
 
@Mix999 again, I recommend trying #debian-mentors on freenode. This channel is frequented by debian devs, and it is supposed to be for people who want to package for Debian, so if you aren't don't advertise it. Regardless, they should be able to help you if anyone can.
 
to a new user like me at least. But such is life as a student I guess :P
 
@Mix999 Debian has reasonable docs. There is the new packagers guide. Well, technical is relative. If you are new to unix, then you might have some problems...
 
@FaheemMitha Alright I will check it out. Thank you for the help. I hope one day I will be able to provide help to new users as well!
 
4:59 PM
but you probably seen those already.
@Mix999 specific questions about debian packaging are on-topic on this site, but the topic of this site is very broad, so you won't get a lot of specialist experts here.
 
@FaheemMitha yup I have read through a lot of those. It is very technical and hard to manage as a newbie but nothing some reasonable google-fu cant solve. (except packaging apparently)
 
@Mix999 well, it takes some getting used to.
 
Anyway I have to go to lunch now. Again thank you for the help and have a good day.
 
@Mix999 Sure, take care.
@Mix999 I actually have done some Debian packaging, and, yes, it can get involved.
 
5:48 PM
@Mix999 I don't think there is anything like that in dpkg. Of course, maintainer scripts can clean up files...
 
@Braiam, what do you mean by the output? Is sudo update-grub a command or a program. — Michiel Uit Het Broek 7 mins ago
PKM!
 
@Mix999 you wrote:
"What I need to accomplish is to allow the package manager to know what files may be created by the program when it runs. These files should not be updated when a new version is installed and should not be deleted when the package is removed. The files should only be removed during a purge of the package."
But I don't understand. So, the first time, a file is created when the deb installs? and this is not updated when the deb is upgraded? So, even if a new file is created, it should be discarded? Or what?
 
@FaheemMitha I'd guess when the package runs it creates /var/log/whatever or something like that.
Or stores state in /var/lib/package/..., or whatever.
 
6:03 PM
@derobert Don't follow.
 
Take alsa-utils as an example. You can use alsactl to save the current sound setup to /var/lib/alsa/asound.state. But that's very machine specific (as well as user-preference specific) So you can't ship that file.
But you still want to remove it (to not leave cruft) if the the package is purged
So in alsa-utils.postrm there is:
case "$1" in
purge)
        # Remove legacy config and state files
        rm -f /etc/alsa/0.9/asound.conf /etc/asound.state
        # Remove configuration file generated by alsaconf
        rm -f /etc/modprobe.d/sound /etc/modutils/sound \
        /etc/modprobe.d/sound.conf
        # Remove state file generated by alsactl
        rm -f /var/lib/alsa/asound.state
        ;;
esac
RPM apparently has a special way to declare files like that. dpkg doesn't.
@Mix999 you might find that alsa-utils example useful, see the previous five messages
 
@Ramesh backticks are evil!
 
@derobert Ok, you mean save the existing state when the package is updated?
 
anyone understand the dual boot tag? I don't....
 
@FaheemMitha Yeah. You don't want to overwrite it on upgrade.
 
6:15 PM
@derobert But it doesn't, because it isn't shipped with the package, afaik.
Anyone know why this guys SD card is not picked up by blkid?
0
Q: Card reader doesn't work on linux

kesivskThe system detect my SD but I cant mount it. This is the lsblk: my@my-N61Jq ~ $ lsblk sdb 8:16 1 29,3G 0 disk and the lsu my@my-N61Jq ~ $ lsusb Bus 001 Device 006: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader Any solution? edit: blkid my-N61Jq ~ # blki...

 
@FaheemMitha Right. It's not part of the package, so it won't be overridden on update. But it also won't be removed on purge, so the maintainer script needs to do that.
 
@derobert Ok, still don't see a problem, or a possible use case for this weird ghost thing.
 
@FaheemMitha What about /var/lib/alsa/asound.state ????
Apparently the RPM folks decided files like that are common enough, so they added support for them in RPM. dpkg has you use maintainer scripts instead.
 
@derobert Right, that's what we were talking about. How would it help if it was used with this ghost feature?
@derobert I'd have to go with dpkg on that. Don't see the point.
 
6:20 PM
@FaheemMitha RPM does a lot of stuff like that, if I remember correctly (been a long while since I did any rpm packaging). Their philosophy seems to be to declare all kinds of stuff in .spec files, and avoid scripts.
It has some advantages (e.g., rpm -qf will be able to tell you what package that file is from, whereas dpkg -S will not be able to), and some disadvantages (you wind up with a lot of directives to try and replace the flexibility of shell script)
 
@derobert I see. I vaguely remember fiddling with rpm spec files in the 90s. It has been a long time for me too. I don't think I looked at anther spec file after switching to Debian in summer 2001.
That guy above has a flash card reader. I think that needs a card plugged in. would blkid still pick it up?
I never really like rpm. It always looked thrown together to me. Debian tends to do much more careful, thought-out engineering.
 
@FaheemMitha no, it won't show in blkid w/o media present
or lsblk, for that matter
 
Also, Red Hat used to have random people working on it. Like that jeff guy.
 
Well, lsblk -a will show it
 
@derobert lsblk seems to be showing something
 
6:24 PM
@Braiam, ??
 
Hmm, actually
sdb 8:16 1 29,3G 0 disk
doesn't look like it.
Hmm, on second thoughts, not sure.
 
11
Q: Is it OK to correct new users on formatting?

strugeeI've noticed that a lot of new users tend to format their posts like this, where they put things they want to emphasize or things that are even just barely vaguely technical in code blocks. This drives me nuts. Is it OK to tell the person in a comment that they're formatting wrong, similar how w...

 
@FaheemMitha Could be his reader. Can't tell just from the name.
 
Oh ok. That dual boot question. I will keep that in mind during future edits. Thanks.
 
@derobert It's probably the reader.
I have a reader, but can't be bothered to fish it out. Plus not sure if I could find a card to plug into it anyway.
 
6:28 PM
@FaheemMitha is not connected ;)
 
I seem to remember in the reader, the cards would be like sdb1, sbd2...
@Braiam Hmm?
 
@FaheemMitha sdcard reader, not connected
 
@Braiam What is not connected? More words, please.
 
What does blkid /dev/sdb say? Also udisksctl info -b /dev/sdb or (only if that gives a command not found error) udisks --show-info /dev/sdb? — derobert 1 min ago
... but I think I'll go get lunch.
 
@derobert Have a good lunch. Where are you going?
 
6:31 PM
No idea.
 
I think blkid should pick up the card if it is plugged in there.
@derobert Seat of the pants decision?
 
Yep. Will probably decide once I get in the car.
 
@FaheemMitha if a sd card reader doesn't work and the system is fine is: 1. is not properly connected, 2. damaged
 
unix.stackexchange.com/questions/148805/… .... I swear we've had that question before.
 
@Braiam Probably. I asked him whether it works on another OS, but of course it is too much trouble to give an intelligble answer.
 
6:45 PM
I wonder if a hacked machine could hide running processes. I suppose it is possible.
 
7:09 PM
Apparently other people watch the IT Crowd too.
@FaheemMitha: Yes I have tried turning it off and on again ;) — user129107 1 min ago
 
 
1 hour later…
8:14 PM
Another information poll - what do people use for scanning. I'm currently finding gscan2pdf works well for me, though I'm not too thrilled at using a Perl script. Plus, it produces all sorts of ominous sounding messages.
 
9:03 PM
@derobert No. It's too messy and it doesn't omit what I've already voted to delete.
The tools for deletion by non-mods suck
@FaheemMitha of course, it's a pretty basic feature for a rootkit
 
@Gilles OK. And how would one diagnose it?
 
9:27 PM
@FaheemMitha with a correctly-implemented TPM and associated infrastructure
a good rootkit, by definition, doesn't make itself known
 
@Gilles TPM?
 
Trusted Platform Module (TPM) is an international standard for a secure cryptoprocessor, which is a dedicated microprocessor designed to secure hardware by integrating cryptographic keys into devices. TPM technical specification was written by a computer industry consortium called Trusted Computing Group (TCG). International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC) standardized the specification as ISO/IEC 11889 in 2009. Trusted Computing Group continues to revise the TPM specification. They published revision 116 of the TPM specification version...
 
@JosephR. what is out-of-band management and how can I do it? — zhilevan 19 mins ago
uhhgg
 
9:41 PM
@Gilles Oh. Sounds complicated.
 
@Braiam And here, I'd say the only solution to OP's problem is to obtain a competent sysadmin, and revoke root access from the not competent one... But that'd not be very nice :-/
 
@zhilevan If you don't know what it is, there's a good chance you don't have it. It's a special hardware solution that allows you to manage a server remotely without the need for an OS to even be installed on the server. To tell you the truth, I only know about it in theory and can't vouch for its applicability in your particular scenario. — Joseph R. 26 mins ago
 
Hah, I have IP KVM on my servers and remote power strips, and even then some of the servers have their own management cards... Definitely useful when something breaks. Has saved me many a visit to the colo.
 
10:01 PM
> Bad has been used to mean good since the 1800s.
O_O
 
drs
10:19 PM
@Braiam, your edit on unix.stackexchange.com/q/148835/34796 makes my comment loose its punch
I hate when people apologize for something and then just do it anyways
in those cases they don't seem that sorry..
 
@drs you don't need to be polite, fun, or whatever just be precise
I'm sure that that question can be written with 4 lines
 
drs
@Braiam I try to be both, but yeah, precision is more important
 
11:04 PM
Ok, dumb question. How do I set the default paper setting for chromium? Currently it is US Letter, I want A4.
 
@FaheemMitha Crtl + P; preferences?
 
@Braiam Permanent fix?
 
11:17 PM
@FaheemMitha I don't see why it won't be
 
@Braiam It isn't. Does it work for you.
 
let me check
@FaheemMitha did you tried to print?
 
@Braiam It sets correctly to A4 for the physical printers, which are both set in CUPS to A4, but the print to PDF option is still set to US Letter.
has a helpful hint.
/etc/papersize <- change the setting
It even ends with "God Bless You". So sweet.
Curious. /etc/papersize does not appear to belong to any file.
Generated by libpaper1 by not owned by that package.
@derobert ^^ topical in light of our earlier discussion.
Which is better for Chromium, adblock or adblock plus?
 

« first day (1397 days earlier)      last day (3540 days later) »