« first day (3024 days earlier)      last day (1964 days later) » 

12:07 AM
Q: Root reserved blocks

D. SmirnovWhile I did Ubuntu netinst, the question came into my head. The question is: is reserved 5% kind of run-time? I mean, when doing something like sudo apt install - this 5% is beign used by root at this moment? Does system use this 5% at run-time? Do I have to increase it up to 10-15% e.g.? I have ...

7 hours later…
7:02 AM
Hi there. When executing the find command with regular expressions, why is the .*/ required? For example find . -maxdepth 1 -regextype posix-egrep -regex '.*/[a-z]'+
1 hour later…
8:15 AM
@Motivated not sure but the . does skip line breaks by default. Generally I would avoid a dot and use a char.class to avoid unwanted matches.
8:33 AM
@Motivated .* means any number of any characters
There is nothing special about / in regex, though it is used as a delimiter. It is literal in the context you give. But of course, in a filename, it's a hierarchy delimiter or directory separator or whatever you wanna call it
1 hour later…
9:39 AM
Q: Cp command does an extra copying on different Ubuntu version for folder cloning

huseyin tugrul buyukisikFor multithreaded folder copying, #!/bin/bash numCopy=$1 shift cmdline="${@}" echo "prepare folders" for ((i=1;i<=$numCopy;i++)); do (cp -rf $cmdline $cmdline$i; ) & (echo "preparing folder clone: $i") & done wait this script copies a source folder $cmdline to (non-existent) destination...

10:37 AM
@Motivated because the -regex test needs to match the entire file name, from the beginning to the end, including the entire path. So to find a called /path/to/foo, you would need to run find /path -regex '.*foo' so that it could match /path/to/foo.
I managed to "Format" my drive during an installation and now I'm trying to recover the partitions. If I recall correctly, they were the following way:
Linux 281.3 GB
Windows 186.72 GB
NTFS drive D: with 463.49 GB and label [inp]
I accidentally formatted my linux, and now it is listed as unallocated.
Now is a good time to point out that I'm a beginner PC user ;-)
So, I created a bootable USB flash drive with SystemResqueCD and ran TestDisk, which found bits of linux and drive D:. Now it asks me to choose partition characteristics for every piece.
Oh, I should probably mention that drive D: was and is functioning correctly, but it listed the drive as deleted
3 hours later…
1:41 PM
@mcmikecreations You should really ask a question on the site instead. There are very few people in chat and the main site is where this sort of thing can be dealt with.
If you do, please try and get a clearer image and only post the relevant part of the image so it can be large enough to read on the page. Even better, if possible copy/paste the text instead of posting an image. @mcmikecreations
2:33 PM
Q: Increasing swap space and removing previous swap space on ubuntu?

Sasha GrievusI have a virtual machine (hosted online) with 2Gb swap space. free -m total used free shared buffers cached Mem: 1995 438 1557 37 22 190 -/+ buffers/cache: 225 1770 Swap: 1998 0 ...

1 hour later…
3:50 PM
Q: How do I configure a Vagrant virtual machine with a host name?

Ben RubinI'm trying to use Vagrant to set up an Ubuntu/Apache virtual machine using Virtual Box on a Windows 10 host, and then configure my host machine so that opening the URL magento.dev in my browser pulls up a page on my virtual machine. Here's the relevant configuration in my Vagrant file Vagrant.c...

4:04 PM
@terdon - Thanks. That isn't clear to me. The construct is '.*/[a-z]+' so wouldn't it be .*/bar e.g. foo/bar? How is it different to find . -maxdepth 1 -regextype posix-egrep -regex '[a-z\.\/]+'?
@Motivated if you put them into a class, the characters can occur in any order. Also . is literal in a character class, but the . in your original expression is not literal - it means any character. So you will get completely different results...
@Zanna - To clarify, what do you mean by a class? I understand that . in a regular expression means any character. It isn't clear to me as to why do i need to have .*/[a-z]+?
stuff in [] is a character class
[a-z] means any characters between a and z (ie the Latin alphabet)
you expression means, any number of any characters, then a / character, then one or more lower case Latin letters
if you put [a-z./] then the characters . and / may occur in any position...
@Zanna - That's clearer. I should clarify my question. Let's say i am looking for files in a particular path e.g. /user/home/. If i describe the expression as .*/[a-z]+. It finds the file test.txt. However if i change the expression to [a-z0-9\.], it fails to find the find even if the expression is designed to meet the conditions of test.txt. I should note that i am in the path that the file exists in i.e. it's in the present working directory
@Zanna - fails to find the find = fails to find the file
4:19 PM
you keep changing the expressions you are talking about. The expression [a-z0-9.] matches one character only, though it could be any of those in the class...
I am expanding on the expression and the example. */[a-z]+ locates the file test.txt but if the expression is [a-z0-9\.]+ (i missed the + in the last post), it doesn't locate the file. Apologies for not including it in the previous post.
Well, you ought to ask a question and make sure you show what your directory structure is etc. I cannot reproduce your problem with the info you have given
@Zanna - If i reduce the syntax to [a-z\.]+, it doesn't locate the file even if it meets the conditions of test.txt
the backslash is not needed btw, because . is always literal in a character class
Okay. The directory structure is /user/home. The file is text.txt so that path would look as such /user/home/test.txt.
@Zanna - I wasn't aware. I was under the impression i had to escape it.
4:28 PM
Don't you mean /home/user/?
Yes. I keep mixing them with Windows. Apologies.
no problem
but anyway you are running the command inside that directory /home/user, you said
and your filename is really test.txt
Yes and the command i am executing is find . -maxdepth 1 -regextype posix-egrep -regex '.*/[a-z\.]+'. This is a copy of the command as i just ran it to test. It locates the file.
4:32 PM
If i now change the expression to find . -maxdepth 1 -regextype posix-egrep -regex '[a-z\.]+', it doesn't locate the file.
Even if [a-z\.]+ meets the criteria to match test.txt
you need a /
or you will not get anything
Why is that?
because all the paths will start with ./ since you specified find . at the beginning
Ah so the path is ./test.txt?
4:34 PM
You can use for example find . -maxdepth 1 -regextype posix-egrep -regex '[a-z/.]+'
That's clear. So i could just have it as './[a-z]+'
because there is a . in the filename...
Yes. I meant ./[a-z\.]+
So as your example of [a-z/.]+
that will work
That's heaps clearer now. Thanks for clarifying that.
4:38 PM
yeah, what @Zanna said. You just need to make sure the regex matches the entire file name, both the path to the file and the actual file name.
@Motivated but, if your . is not in a character class, you should escape it if you want it to be literal
@terdon - Yes, that makes a lot more sense now.
otherwise, as you know, it will match anything
in a character class you need not escape it
@Zanna - That makes sense
4:39 PM
Another question if that's okay.
I have been attempting to wrap my head around tty, pty and pts. I have read posts such as (unix.stackexchange.com/questions/335992/…) however it remains unclear. My understanding is that when Linux boots to a text console i.e. a virtual console (CTRL-ALT-F1), it establishes tty1. If i access another virtual console e.g. CTRL-ALT-F2, it would be tty2 and so forth.
@Motivated You could also go to tty1 with Ctrl+Alt+F1
If now login, my understanding is that the default shell e.g. bash establishes pty
If i now run a command e.g. less test.txt, it establishes pts
Have i understood it correctly?
@Motivated Why would a command create a new device?
But really, it would be much better if you posted a question about this. The best place would probably be Unix & Linux.
@terdon - It isn't clear to me as to when pty and pts are created. I did consider posting it however sensed it may be marked as duplicate.
I was hoping i could work through an example or examples to understand when tty, pty and pts are created
@Motivated Not if you link to another question (like the one you linked to here) and explain what parts are still not clear to you.
Make sure to also link to this one:
Q: What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?

LazerI think these terms almost refer to the same thing, when used loosely: terminal shell tty console What exactly does each of these terms refer to?

4:48 PM
@terdon - Yes, i have read that too and it confuses me further.
And ping me when you've posted and I can help make sure it's not a dupe (I'm a site moderator there too).
@terdon - Great. Thanks.
5:38 PM
Q: How to Resolve Yum Dependencies for Oracle DB Installation

MalvonI have a Ubuntu 18 VM and am trying to install an Oracle 12c database locally. I have downloaded the related .rpm file and try to install it as instructed via: yum -y localinstall oracle-database-se-18c-1.0.1.x86_64 However, I'm getting the following dependency error: yum -y localinstall orac...

I am reopening askubuntu.com/questions/1032847/… as I think I have found a viable solution.
TY! :)
TY! :)
5:47 PM
\o/ :D
6:00 PM
@Terrance yo \o
Hello All
could anyone please help me with this question: askubuntu.com/questions/1108333/…
@Rinzwind o/ Hello!
@Rinzwind And Thank you!
1 hour later…
7:44 PM
Q: "very low quality" vs "should be closed ---> unclear what you're asking" tags

dsSTORMI can't really understand when I should use one flag or the other, for example on this question. Both of those tags seem to imply that a question is poorly written and should be removed, so why are they 2 different tags? Or am I missing something? I tried looking at this question on the meta site...


« first day (3024 days earlier)      last day (1964 days later) »