Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm just getting started with GPG. I've created a key pair and now have several .gpg files:
drwx------ 2 jason jason 4096 Feb 11 21:10 ./
drwx------ 90 jason jason 45056 Feb 11 20:49 ../
-rw------- 1 jason jason 9398 Feb 11 20:49 gpg.conf
-rw-rw-r-- 1 jason jason 2316 Feb 11 21:10 mypk
-rw------- 1 jason jason 1633 Feb 11 20:52 pubring.gpg
-rw------- 1 jason jason 1633 Feb 11 20:52 pubring.gpg~
-rw------- 1 jason jason 600 Feb 11 20:52 random_seed
-rw------- 1 jason jason 1794 Feb 11 20:52 secring.gpg
-rw------- 1 jason jason 1280 Feb 11 20:52 trustdb.gpg
Am I correct to understand that secring.gpg is my private key? This file is protected by my passphrase, right? Is it ok to just keep this file on my machine? Should I move it somewhere more secure (say a thumb drive)?
Am I correct to understand that secring.gpg is my private key?
From man gpg:
~/.gnupg/secring.gpg
The secret keyring. You should backup this file.
This file is protected by my passphrase, right?
If you set one, yes. Actually not the file itself is protected, but each contained key can be (you can have multiple private keys in your secret keyring).
Is it ok to just keep this file on my machine? Should I move it somewhere more secure (say a thumb drive)?
This depends on your needs and trust in your machine.
Do you have special security needs, share your machine or expect it to be hacked/stolen/...? Better put it on an external device and then reference it using --secret-keyring /path/to/secring.gpg whenever using gpg or put it into your gpg.conf: secret-keyring /path/to/secring.gpg.
Do you trust the integrity of your computer, possibly even encrypted your files on it? Will you have to use your secret key a lot? Better keep the file on your hard drive as this saves hassles with using gpg.
For putting your key on a separate device, think of using an OpenPGP card. Using one, your secret key will never leave that card (for signing and decrypting) but for backup purpose. Definitely increases nerd factor, too. ;)
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I am working through this resource: https://cmdchallenge.com
On the following challenge: https://cmdchallenge.com/s/#/search_for_files_containing_string, the problem was:
Print all files in the current directory,
one per line (not the path, just the filename)
that contain the string "500".
When I ran:
ls -al
I got the following:
total 36
drwxr-xr-x. 2 501 dialout 4096 Feb 10 21:08 .
drwxr-xr-x. 39 501 dialout 4096 Apr 18 19:04 ..
-rw-r--r--. 1 501 dialout 204 Apr 29 17:44 README
lrwxrwxrwx. 1 501 dialout 23 Feb 10 20:59 access.log -> ../../common/access.log
lrwxrwxrwx. 1 501 dialout 25 Feb 10 21:08 access.log.1 -> ../../common/access.log.1
lrwxrwxrwx. 1 501 dialout 25 Feb 10 21:08 access.log.2 -> ../../common/access.log.2
I tried a few things, then looked at the user submitted solutions and one of them was:
ls *[^2]
I did some googling and the man page (and here), but I can't see what this is doing, or how it works.
Can anyone point me to a decent resource so I can read up on it, or tell me how it works?
Let me first quote PesaThes comment to what the command does:
The reference you are looking for is in the manual under: pattern matching. * matches any string, [^2] matches any character that is not 2. So the command lists all files that do not end in 2
Now why this is a solution to the problem is not so clear from your question alone. But if you look what the files contain you will notice that indeed, access.log.2 is the only one that does not contain the string 500 and also the only one whose name ends in 2.
For other sets of files the command ls *[^2] will most probably not output all the files without the string 500 in it, but in this case with those specific files it matches the right files. Another solution would have been for example
echo README; echo access.log; echo access.log.1
that's not an answer to your question, the right way of doing it is
$ grep -sl 500 * .*
-s skip errors (caused by directories); l only filenames; search in * all visible files and .* invisible files.
I am trying to give myself root access to all the file in this folder and not have to sudo everything I want to run a command.
The file I am concerned with is pro
When I enter ls -l I get :
drwxr-xr-x+ 12 Guest _guest 384 13 Jan 14:56 Guest
drwxrwxrwt 9 root wheel 288 13 Jan 14:30 Shared
drwxr-xr-x+ 148 Santi staff 4736 1 Apr 17:13 pro
then I enter chmod 775 pro/
It doesnt seem to change the permssions. What can I do to fix this or why is the folder restricting permission even though I appear to be root?
drwxr-xr-x+ ...
the final + means that the file is governed by acl
see
apropos acl : give you the mans to consult
wikipedia
Access Control Lists on Arch wiki
On my win-10 machine, dired shows this:
drwxr-xr-x 58 jkb jkb 4096 Nov 5 11:08 ..
drwxr-xr-x 6 jkb jkb 4096 Nov 6 09:34 .
Where the .. entry comes first. How do I modify the installation to change it back to this:
drwxr-xr-x 6 jkb jkb 4096 Nov 6 09:34 .
drwxr-xr-x 58 jkb jkb 4096 Nov 5 11:08 ..
It is not a big issue, except that on my mint 18 machine it shows the traditional order. Uniformity would be good.
Many thanks for pointers and advice.
[See the first comment to this question for the answer]
Formal answer:
I can solve my issue by setting ls-lisp-UCA-like-collation to nil:
'(ls-list-UCA-like-collation nil)
in the customize section of my .emacs file or via the customize menus.
The change has the side-effect of changing the ordering of the cygwin home directory, the ~/.* files come first now.
There may be another option to fix that, if it is important.
Note that this is an issue with dired on emacs, using ls-lisp.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Anywhere I ls -a folder contains files called "." and "..".
Anybody knows what is this stuff? Is this some system files? Is this some kind of a virus or something? I have hard time googling because of such file names.
Here is an example:
drwx------+ 12 mih staff 408 4 янв 16:49 .
drwxr-xr-x+ 91 mih staff 3094 20 мар 15:28 ..
-rw-r--r--# 1 mih staff 6148 4 янв 16:49 .DS_Store
-rw-r--r-- 1 mih staff 0 10 ноя 2011 .localized
-rw-r--r--# 1 mih staff 181 27 ноя 2011 Desktop.ini
-rw-r--r--# 1 mih staff 8198298 29 июл 2013 Dizzee Rascal - Bassline Junkie.mp3
Yes, those are system files.
A subdirectiry contains two directory entries that were used to navigate between folders in the early days of DOS.
The . entry is a directory reference to the same directory.
The .. entry is a directory reference to the parent directory.
Those are like regular subdirectories, but instead they point to directories that already exist.
Nowadays those wouldn't actually be needed, the system could interpret . and .. anyway, but in the early days they were needed for the system to find the way back to the parent directory.
"." is a representation of the current directory in Unix based systems. ".." Is for upper directory.
Hi I have created an aplication myprogram.app file. Now I want to create Drag and drop DMG file for that application. Skype and other software does the same thing.
How to create Drag and Drop DMG file foe my application.
Thanks
Sunil Kumar Sahoo
It's actually pretty easy. You just need to compose some hidden files. Easy way to do this is to just copy someone elses and change to suit your app.
For example, if I mount the MonoDevelop DMG, then I see:
atom:MonoDevelop fak$ ls -al
total 40
drwxr-xr-x 8 fak staff 340 Nov 4 14:03 .
drwxrwxrwt# 10 root admin 340 Nov 10 21:33 ..
-rw-r--r--# 1 fak staff 12292 Nov 4 14:03 .DS_Store
d-wx-wx-wt 2 fak staff 68 Nov 4 14:03 .Trashes
drwxr-xr-x 3 fak staff 102 Nov 4 14:03 .background
drwx------ 4 fak staff 136 Nov 4 14:03 .fseventsd
lrwxr-xr-x 1 fak staff 13 Nov 4 14:03 Applications -> /Applications
drwxr-xr-x 3 fak staff 102 Nov 4 14:02 MonoDevelop.app
Here we see .background that is a directory with a PNG file (the background). The app itself (MonoDevelop.app) and a link to /Applications.
The .DS_Store contains the window size, icon positions, etc. Just setup a directory and use the .DS_Store from it.
There's really not any magic to this. You can create a disk image with Disk Utility. Put the stuff on it that you need, and then convert it to a compressed read-only image (again, with Disk Utility).
For some tips on prettying up the appearance of the window, check out this question. If you need to automate this process, check out this other question for some ways to do that.