221 reputation
16
bio website
location
age 42
visits member for 1 year, 8 months
seen 2 days ago

Apr
16
comment Need to run su command If I am a user with sudo access
@Ouki: I didn't know that, thanks.
Apr
16
comment Need to run su command If I am a user with sudo access
It might also be worth mentioning that today systems are often set up so that root doesn't have its own password at all, so you only can run commands with root permissions through sudo, not through su alone (I don't know if this is also the case for Oracle Linux).
Apr
16
comment Need to run su command If I am a user with sudo access
@ursitesion: No, it only affects the command you give it as argument. It doesn't make "you" root, it starts a new root process for the command you use it for.
Apr
16
awarded  Yearling
Apr
16
comment Need to run su command If I am a user with sudo access
Actually, you can just do sudo bash to get a root shell.
Apr
16
comment Setting environment variables at runtime in KDE4
@xenoterracide: That's not entirely correct: The process itself can update its environment (through putenv). And of course the process can provide an interface for you to do it as well (like e.g. bash does). Therefore the question really is: Does the KDE component responsible for launching new processes have an interface to change environment variables? I guess the answer will still be "no", but it's not a given.
Apr
16
comment Setting environment variables at runtime in KDE4
Well, I guess with root permissions, you could just write into the memory where the process's environment is stored.
Apr
16
comment What's the difference between 'expansion' and 'substitution' in terms of shell programming's terminology?
Looking at the bash man page, in general the word "expansion" seems to be used if only shell-internal stuff is involved, while "substitution" seems to be preferred for things involving external processes.
Apr
16
revised How process substitution is implemented in bash?
Added missing bits for a full explanation what happens
Apr
15
awarded  Commentator
Apr
15
comment Are system calls the only way to interact with the Linux kernel from user land?
Put silly as global variable and make it itself volatile as well, and no sane compiler will optimize it, because it cannot know whether silly will be mapped to a memory-mapped I/O region during linking, in which case reading silly may not recover the 0 previously stored in it, but might actually deliver a valid address.
Apr
15
comment removing the last line of a file not working?
You're welcome.
Apr
15
answered How process substitution is implemented in bash?
Apr
15
answered removing the last line of a file not working?
Apr
15
comment removing the last line of a file not working?
Are you sure there's an empty line at the end? Note that a correctly formatted Unix text file ends in a linefeed character (because it is a line ending character, not a line separation character, in Unix). What does the end of the output of xxd r3.txt look like?
Apr
6
comment /bin /etc /lib64 /root /sbin deleted or moved by mv folder/* /* while su
Err, you're right. Sorry, I got confused.
Apr
6
comment /bin /etc /lib64 /root /sbin deleted or moved by mv folder/* /* while su
@PavelŠimerda: Well, your mv command certainly is right (I don't know whay I was thinking you'd need for in my comment above), but you mention it before mentioning a live CD. And on the borked system, you'll have to go through the trouble Patrick described to get it running. From the live CD, you'll just have to mount the corresponding partition(s) and can then issue mv normally. Which was my point.
Apr
6
comment /bin /etc /lib64 /root /sbin deleted or moved by mv folder/* /* while su
@PavelŠimerda: I don't see where he even mentions a live system to boot into. His post (besides the explanation what happened) is all concerned about why the system doesn't work as expected and how one might get things working on the very same system that just got borked. Not from a live system.
Apr
6
comment /bin /etc /lib64 /root /sbin deleted or moved by mv folder/* /* while su
@user1296209: If you boot a live system, you certainly have root access on your life system. Your actual system is just a mounted partition with no special meaning for the live system. The only complication is that your / and /var directories may be on different partitions, in which case you have to mount both.
Apr
6
comment /bin /etc /lib64 /root /sbin deleted or moved by mv folder/* /* while su
@PavelŠimerda: The problems in his post are all about the problems to fix it in the very same system that was borked. When booting a live system, all those problems are gone because the mv commands you issue are the live system's mv command.