« first day (3064 days earlier)      last day (1893 days later) » 

12:50 AM
0
Q: How to fix "amdgpu dkms failed for running kernel" when installing amd gpu drivers?

deef0000dragon1I am attempting to install the AMD gpu drivers for an RX 480 in Ubuntu 18.4.2. Whenever I run amdgpu-install or amdgpu-pro-install I get amdgpu dkms failed for running kernel. Link to make.log I should note that I do have NVIDIA drivers installed as well, as I am using an NVIDIA 1070ti fo...

 
 
4 hours later…
4:36 AM
0
Q: question body does not meet our quality standards

fixit7I tried to post on ask ubuntu, but got this message. This question body does not meet our quality standards. Please make sure that it completely describes your problem - including what you have already tried - and is written using proper grammar. My post would describe my problem AND s...

 
 
6 hours later…
10:19 AM
0
Q: Ubuntu: bash: cannot create temp file for here-document: No space left on device

GlasnhostI receive the error No space left on device from bash upon filename tab completion. As I try to spot what has eaten up my space, as suggested on similar question, I'm confused by df -ah results. My pc has 220GB disk and it seems only 66GB are used. Where is the problem? lot of docker images in...

 
 
1 hour later…
11:43 AM
 
 
3 hours later…
2:31 PM
1
Q: Sudoers to remove password from specific commands

GRBI'm having a bit of trouble with sudoers syntax. Long story short, I'm struggling with my graphics card and I recently found out that I can turn it on and off with a simple command (previously it was always off, which is good 90% of the times, but sometimes I'd like to use its extra power sometim...

 
 
3 hours later…
5:20 PM
what the heck? why is opening a file and grepping it faster than reading a variable holding the file content and grepping it? oO
$ time for i in {1..1000}; do </proc/meminfo grep -oP '^SwapTotal: *\K[0-9]*' &>/n; done
real    0m0.894s
user    0m0.669s
sys     0m0.272s
$ a=$(</proc/meminfo)
$ time for i in {1..1000}; do <<<"$a" grep -oP '^SwapTotal: *\K[0-9]*' &>/n; done
real    0m1.201s
user    0m0.928s
sys     0m0.325s
 
5:33 PM
/proc/meminfo isn't a regular file anyway, it's a kernel interface
and as such I could totally imagine that to respond faster than Bash variables...
also not sure about here-string performance
 
6:06 PM
Less than one day of bounty and didn't get the kind of answer I hoped for
 
6:47 PM
@ByteCommander it’s the same as with echo "$a" | … at least
@ByteCommander fair point
@ByteCommander but no, as far as my tests show it’s the exact same with a regular file
oops, sorry for the ping storm
 
whoosh
/shrug
 
/proc/ is definitely not a normal file.
@dessert However, this might be an interesting question to ask on U&L. They have some super experts that could probably explain, in detail, exactly why it is faster.
Or why it's not faster but looks that way.
 
$ cat </proc/meminfo >meminfo
$ time for i in {1..1000}; do <meminfo grep -oP '^SwapTotal: *\K[0-9]*' &>/n; done
real    0m0.913s
user    0m0.692s
sys     0m0.275s
@Seth good idea
 
7:31 PM
0
Q: Trying to execute a script (that creates folders) on remote server: “Permission denied”

PakI wrote a very simple script that should allow me to create directories with specific permissions on a remote server. I used the command to execute the script to the remote server: stan@192.168.159.133 /root/Documents/script And I got this answer: bash: /root/Documents/script: Permission den...

 
 
2 hours later…
9:41 PM
@dessert Link me up if/when you post, you've piqued my interest.
 
9:58 PM
@dessert try again with for (( i=1; i<=1000; i++ ))
@dessert Ah...
 
@Fabby no change
 
Mmmh... Interesting
@dessert It's because of linefeeds
the memory variable does not contain line feeds whereas the file does.
so grep reads the entire variable every time, whereas it reads one line in the case of a file is my guess.
@dessert Did you post a question on U&L?
 
@Fabby not yet, no
 
Well, no need now, unless you want to double-check my assumption.
 
why would the variable not contain line feeds?
 
10:06 PM
echo $a
MemTotal: 16363076 kB MemFree: 2748448 kB MemAvailable: 13435572 kB Buffers: 2901144 kB Cached: 8003140 kB SwapCached: 0 kB Active: 5663016 kB Inactive: 7381104 kB Active(anon): 1875588 kB Inactive(anon): 373124 kB Active(file): 3787428 kB Inactive(file): 7007980 kB Unevictable: 64 kB Mlocked: 64 kB SwapTotal: 19530748 kB SwapFree: 19530748 kB Dirty: 484 kB Writeback: 0 kB AnonPages: 2138324 kB Mapped: 584708 kB Shmem: 108692 kB Slab: 320560 kB SReclaimable: 237964 kB SUnreclaim: 82596 kB KernelStack: 13600 kB PageTables: 47292 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB C
Because I tested.
Empirical evidence...
Do you want me to look up why it doesn't do that?
(probably because of emacs)
:D
 
no, wait a moment…
@Fabby test again with less <<<"$a"
it’s echo’s fault I suppose
aha: quoting strikes again: echo "$a" !
 
@dessert yup
echo "$a" contains linefeeds
@dessert and you quoted so that's not it...
 
a=$(</proc/meminfo) is a short equivalent of a=$(cat /proc/meminfo), so that would be awkward
 
Ask on U&L is what I would do...
 
:)
 
10:13 PM
it's an interesting question.
Stephen Kitt will probably answer.
 
will do, just not today
 
normally I think mods are pains in the lower abdomen but this time I agree with @Seth
>:-) ;-)
@dessert Urgh...
Want me to ask???
 
no, I’ll do it, promised!
 
@dessert :D Good!
Because now I want to know too!
they're both reading from memory as /proc/ is in RAM anyway, but a variable should still read faster than a cached file...
 
@Fabby and from a normal file <meminfo it’s exactly the same as from </proc/meminfo!
 
10:18 PM
yup, saw that.
That's what i ment with:
18 mins ago, by Fabby
@dessert Ah...
 
bash should open (and close) the file on every single pass, how can that be faster than reading a variable? …
 
Kernel more efficient that bash...
 
the kernel has nothing to do with it if you take a regular file
0
Q: What !! means while calling echo

SanyaCould somebody explain this output? $ echo ! ! $ echo !! echo echo ! echo ! $

@Fabby ^ jump on it, I’m off to bed :)
> !! Refer to the previous command. This is a synonym for `!-1'.
 
10:35 PM
@dessert already posted.
 
0
Q: Recommended format for backup extension drive

yobro97I have a 2TB seagate extension drive formatted to NTFS. I have been using it for read and write purposes in Windows and read only in Linux. Now that I have decided to get rid of windows, I need to decide on it's format. I have researched online to find out that it may not always be safe to write ...

 

« first day (3064 days earlier)      last day (1893 days later) »