- Last 7 days
-
stackoverflow.com stackoverflow.com
-
If you run this in Powershell in Windows 10, you will get the error about "OI not recognized". Solution: Put the user+perms argument in quotes. For example: C:\>icacls "D:\test" /grant "John:(OI)(CI)F" /T
Very Important to know!
-
- Mar 2024
-
linuxize.com linuxize.com
-
Use the lsb_release -a command to display the Ubuntu version.
-
- Feb 2024
-
unix.stackexchange.com unix.stackexchange.com
-
if [ "$#" -eq 0 ]; then cat else printf '%s\n' "$@" fi |
-
-
unix.stackexchange.com unix.stackexchange.com
-
The lonesome cat isn’t useless. UUOCs are typically characterized by having exactly one filename argument; this one has none. It connects the input to the function (which is the input of the if statement) to the output of the if statement (which is the input to the base64 –decode statement)
-
-
-
You can pre-seed your less pager with a search pattern so that you can move between files with n/N keys: [pager] diff = diff-so-fancy | less --tabs=4 -RFXS --pattern '^(Date|added|deleted|modified): '
-
-
github.com github.com
-
open in editor
Tags
Annotators
URL
-
-
unix.stackexchange.com unix.stackexchange.com
-
Try adding \ before your ls, e.g.: \ls | xargs file.
-
The ls command doesn't expand wildcards, it's the shell that does. Do not parse the output of ls, it's practically never needed and often breaks something.
-
-
stackoverflow.com stackoverflow.com
-
DO NOT PARSE LS.
-
- Apr 2023
-
stackoverflow.com stackoverflow.com
-
--ignore-unmerged When restoring files on the working tree from the index, do not abort the operation if there are unmerged entries and neither --ours, --theirs, --merge or --conflict is specified. Unmerged paths on the working tree are left alone. Holy smokes! I guess the git-ish fix for the user interface problem here will be to rename the option from --ignore-unmerged to --ignore-unmerged-except-in-cases-where-we-do-not-want-to-allow-that--consult-documentation-then-source-code-then-team-of-gurus-when-you-cannot-figure-it-out---and-wait-while-half-of-them-argue-about-why-it-is-right-as-is-while-the-other-half-advocate-adding-four-more-options-as-the-fix.
-
- Nov 2022
-
stackoverflow.com stackoverflow.com
-
find . -regextype posix-extended -regex ".*\.(jpg|gif|png|jpeg)"
-
That's an important remark. find /path/to/ -iname '*.gif' -o -iname '*.jpg' -print0 will only print the jpg files! You need brackets here: find /path/to/ \( -iname '*.gif' -o -iname '*.jpg' \) -print0
-
-
unix.stackexchange.com unix.stackexchange.com
-
And get a list of characters in a font like this:
-
- Sep 2022
- Jul 2022
-
stackoverflow.com stackoverflow.com
-
Always use a while read construct: find . -name "*.txt" -print0 | while read -d $'\0' file do …code using "$file" done The loop will execute while the find command is executing. Plus, this command will work even if a file name is returned with whitespace in it. And, you won't overflow your command line buffer.
-
-
stackoverflow.com stackoverflow.com
-
So the correct command to use is findmnt, which is itself part of the util-linux package and, according to the manual: is able to search in /etc/fstab, /etc/mtab or /proc/self/mountinfo
-
- Nov 2021
-
capiche.com capiche.com
-
Suddenly we’d come full circle. The fastest way to launch programs was to type their name into a box, only a box that looked a bit more stylish than the terminal of old.
-
-
www.linuxuprising.com www.linuxuprising.com
-
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepoflatpak install flathub org.chromium.Chromium
-
- Oct 2021
- Jul 2021
-
pragmaticpineapple.com pragmaticpineapple.com
-
fzf --preview 'bat --style=numbers --color=always --line-range :500 {}'
-
- Jun 2021
- Apr 2021
-
linux.die.net linux.die.net
-
stackoverflow.com stackoverflow.com
-
unbuffer connects to a command via a pseudo-terminal (pty), which makes the system treat it as an interactive process, therefore not using any stdout buffering.
-
-
writefreely.org writefreely.org
-
![Cosmic radiation](https://i.snap.as/T05UTpx.jpg)
Since a lot of this is guaranteed to be seen as arcane magic, maybe this is an opportune place for the UI hooks for a conversational/palette-based UI? Maybe
>>
to set it off?
-
-
expect.sourceforge.net expect.sourceforge.net
-
unbuffer disables the output buffering that occurs when program output is redirected. For example, suppose you are watching the output from a fifo by running it through od and then more. od -c /tmp/fifo | more You will not see anything until a full page of output has been produced. You can disable this automatic buffering as follows: unbuffer od -c /tmp/fifo | more
-
-
en.wikipedia.org en.wikipedia.org
-
Today, many users rely upon graphical user interfaces and menu-driven interactions. However, some programming and maintenance tasks may not have a graphical user interface and may still use a command line.
-
-
-
stackoverflow.com stackoverflow.com
-
If there are some pipe between these commands, you need to flush stdout. for example: script -q /dev/null commands... | ruby -ne 'print "....\n";STDOUT.flush'
-
-
linusakesson.net linusakesson.net
-
Job control is what happens when you press ^Z to suspend a program, or when you start a program in the background using &
-
-
en.wikipedia.org en.wikipedia.org
-
The command also can be run in silent mode (tty -s) where no output is produced, and the command exits with an appropriate exit status.
-
-
unix.stackexchange.com unix.stackexchange.com
-
Quite a lot of programs actually detect if their output goes to a file (e.g. try man | grep -F a and you will not be able to scroll back and forth).
-
-
unix.stackexchange.com unix.stackexchange.com
-
-
sed can do so much more, but is totally overkill for this. tr is the right tool for THIS job, but knowledge of sed and regexes will certainly come in handy later!
-
- Mar 2021
-
askubuntu.com askubuntu.com
-
Given the deskopen script, you can use a reference to it as the shebang line in a .desktop file
-
this is so stupid (that there is no sensible way to run a Desktop file from the terminal)
-
gtk-launch <app-name> - where <app-name> is the file name of the .desktop file, with or without the .desktop extension.
-
-
-
unix.stackexchange.com unix.stackexchange.com
-
I find it convenient to change proxy and other settings through gui window by right-clicking on launcher icon on my desktop. I mostly start slack by clicking desktop launcher, but also want to be able to start it from command line in some cases.
-
If you really want this, I suggest you write a little function that extracts the executable name from the .desktop file and runs it. Add these lines to your shell's initialization file (e.g. ~/.bashrc): runDesktop () { eval "$(awk -F= '$1=="Exec"{$1=""; print}' "$1")" } Then, you can run your .desktop file with runDesktop ~/Desktop/slack.desktop
-
-
gitlab.gnome.org gitlab.gnome.org
-
We could add heuristics like: is the file inside XDG_DATA_DIRS/applications? if not, is the file inside XDG_DATA_HOME/applications? if not, is the file marked as executable? if not, open with the text editor
-
Hello , since I made a modification in gio-tool (#2098 (closed)) , I seen this issue and decide to give it go. I implemented an unix only solution only for launching a desktop file through gio command, see !1779 (merged)
-
When one is searching for it on the internet, there are many many people wondering how one can open .desktop files. It seems trivial, since one usually just has to click an item on the launcher so one thinks there must be some way.
-
I have to agree with Raphael here that this should probably be handled in gnome-open, its a pain to have to implement .desktop parsing code in every beagle front end when I can't really think of an instance where the expected behavior wouldn't be to execute the associated command.
-
I don't know what nautilus does, but i think when you double click a .desktop file it launches the associated program, i guess they don't use gnome-open then..
-
deskbar should probably detect their extension and execute the relevant command as opposed to opening the file for editing.
-
-
gitlab.gnome.org gitlab.gnome.org
-
github.com github.comjceb/dex1
-
unix.stackexchange.com unix.stackexchange.com
-
Is somehow possible to run a "Desktop Entry" from another "Desktop Entry"?
More generally, my question is: How can I programmatically / from command line, launch a .desktop file?
-
- Feb 2021
-
stackoverflow.com stackoverflow.com
-
For example, on the terminal I'm using, the right arrow outputs ^[[C. You can see what sequence your terminal outputs by pressing Ctrl-V Right Arrow. The same is true for other cursor-control keys such as Page Up and End.
-
-
stackoverflow.com stackoverflow.com
-
As usual with almost any command, if you want a normal argument that starts with a - to not be interpreted as a switch, precede it with --
-
- Dec 2020
- Nov 2020
-
unix.stackexchange.com unix.stackexchange.com
-
rsync --info=progress2
-
- Oct 2020
-
github.com github.com
-
security.stackexchange.com security.stackexchange.com
-
As of OpenSSL 1.1.1, providing subjectAltName directly on command line becomes much easier, with the introduction of the -addext flag to openssl req
-
-
github.com github.com
-
I debugged docker-compose and docker-py and figured out that you should either use environment variables or options in command. You should not mix these . If you even specify --tls in command then you will have to specify all the options as the TLSConfig object, as now TLSConfig object is created completely from the command options and operide the TFSConfig object created from the environment variable.
-
-
github.com github.com
- Sep 2020
-
github.com github.com
Tags
Annotators
URL
-
- Aug 2020
-
stackoverflow.com stackoverflow.com
-
xargs -0 cp -t ~/foo/bar
-
Speed example -- over 829 files, the "find -exec" method took 26 seconds while the "find -print0 | xargs --null" method tool 0.7 seconds. Significant difference.
-
-
stackoverflow.com stackoverflow.com
-
Sadly, bash can't handle long options which would be more readable, i.e.:
-
- May 2020
-
github.com github.com
-
www.catb.org www.catb.org
-
Write programs to handle text streams, because that is a universal interface.
-
- Apr 2020
-
github.com github.com
-
The gem provides a command line utility for checking passwords.
-
-
support.1password.com support.1password.com
-
github.com github.com
-
stackoverflow.com stackoverflow.com
-
I had never considered it that in nearly a decade of using GNU find! Thank you for that! It will definitely change the way I think about -prune from now on.
-
I think this structure is much easier and correlates to the right approach
-
it isn't actually -prune itself that causes this, by the way. The issue is that the or operator "short-circuits", and or has lower precedence than and. The end result is that if a file called .snapshot is encountered it will match the first -name, -prune will then do nothing (but return true), and then the or returns true since its left-argument was true. The action (eg: -print) is part of its second argument, so it never has a chance to execute.
-
If all you want to do is print the results you might be used to leaving out the -print action. You generally don't want to do that when using -prune.
-
which means that it'll also print out the name of the directory you're pruning, which usually isn't what you want. Instead it's better to explicitly specify the -print action if that's what you want
-
The thing I'd found confusing about -prune is that it's an action (like -print), not a test (like -name). It alters the "to-do" list, but always returns true.
-
-
www.theunixschool.com www.theunixschool.com
-
Did you expect the temp directory to get printed? In the last example, we saw the directories ./temp and ./C/temp got printed, but not now. This is the effect of the -print option. By default, the find command prints all the files matching the criteria. However, once the -print option is specified, it will print files only on explicit print instructions. In this find command, -print is associated in the other side of the OR condition, and hence nothing will get printed from the 1st part of the condition.
-
12. Same using the wholename option and prune to exclude directory: $ find . -wholename "./temp" -prune -o -perm 644 -print ./area.pm ./C/temp ./C/f2.c find has a switch with the name 'wholename'. Say, in your directory tree, there might be more than one temp directory. The earlier approaches will prune all the temp dierctories. In case, if the requirement is to prune a specific temp directory, then you can give the path of the directory itself. Note: The path specified in the wholename option should be relative to the search path specified, not the absolute path.
-
- Mar 2020
- Jan 2020
-
project.cyberpunk.ru project.cyberpunk.ru
-
In the Beginning was the Command Line -- Neal Stephenson
-
- Dec 2019
-
help.github.com help.github.com
-
GitHub Packages uses the native package tooling commands you're already familiar with to publish and install package versions.
Looks like GitHub Packages acts as a wrapper to these clients, acting on your behalf so you don't have to use the CLI yourself.
-
-
unix.stackexchange.com unix.stackexchange.com
-
Using find and cpio is a more unix-y approach in that you let find do the file selection with all the power that it has, and let cpio do the archiving. It is worth learning this simple use of cpio, as you find it easy to solve problems you bang your ahead against when trying tar.
-
find
-
-
yarnpkg.com yarnpkg.comYarn1
- Nov 2019
-
stackoverflow.com stackoverflow.com
-
From the man pages The environment variables can be specified in lower case or upper case. The lower case version has precedence. http_proxy is an exception as it is only available in lower case. Using an environment variable to set the proxy has the same effect as using the --proxy option
-
-
kentcdodds.com kentcdodds.com
- Nov 2017
-
timmurphy.org timmurphy.org
-
In Bash you quite often need to check to see if a variable has been set or has a value other than an empty string. This can be done using the -n or -z string comparison operators.
Two most useful commands in bash
-
- Jun 2017
-
www.cloudera.com www.cloudera.com
-
Very useful kafka command-line tools to keep track of what's happening in your kafka cluster.
-
- Nov 2015
-
www.w3.org www.w3.org
-
If you have a copy of the ReSpec repository handy, you may see that there is also a respec2html.js tool under tools/. Feel free to try using it instead of the above process, but please note that it is not used much currently and may behave in a somewhat experimental manner (experiences with it vary — but it's worth a shot if you're looking for a way to generate ReSpec output from the command line).
Respec (sadly) doesn't quite have a command line tool...at least not one comparable to a browser's output.
Maybe PhantomJS (which Respec uses for tests) would do a better job?
Tags
Annotators
URL
-