Skip to main content

All Questions

Tagged with
5 votes
1 answer
67 views

How to reposition window in SSH session? I am logging into a Linux machine from a Mac machine

I am using a Mac with XQuartz to display an X application running on a remote CentOS machine. I'm trying to reposition the window from the remote machine using my keyboard, as it opens in such a way ...
blaughli's user avatar
0 votes
1 answer
425 views

How do I use sed to parse a string that includes hyphens?

Input example: foobar_1-1 1024 x 1024 Desired output foobar_1-1 The hyphen is causing issues here. It's causing the output to be two items in the array: foobar_1, 1 Any advice?
Patrick Hennessey's user avatar
1 vote
0 answers
744 views

macOS: How to switch default rsync with a MacPorts version

The default version of rsync (2.6.9) provided with macOS Sierra, High Sierra and Mojave does not work well with newer installations of rsync (3.1.x). For example using rsync -x on a remote machine ...
Levi's user avatar
  • 121
3 votes
0 answers
2k views

Why does this netcat pipeline work in macOS but not Linux?

I set up the following pipeline. This allows me to see the raw HTTP requests and responses that pass through the pipeline. Note: I use BSD nc below (this is what comes with macOS and AmazonLinux), ...
Josh Cooley's user avatar
13 votes
2 answers
4k views

Use of / when using cd

I'm in my home directory on my mac: $ pwd /Users/lukas When I cd around, I do not (and can't) start the path with /: $ cd Documents/ /Users/lukas/Documents $ cd /Documents -bash: cd: /Documents: ...
LukasKawerau's user avatar
1 vote
0 answers
1k views

See output command terminal history in zsh terminal

I'm in an edge situation and I really need to retrieve some generate random value I executed last week in iTerm through the command: cat /dev/urandom |LC_ALL=C tr -dc 'A-Z9' | fold -w 81 | head -n 1 ...
Enot's user avatar
  • 111
4 votes
1 answer
3k views

How to add blank lines above the bottom in terminal

In vim and many other text editors, you can scroll up the end of the file to the top of your screen while showing the rest of the lines as blank. But in terminal, by default, the end of line is fixed ...
Kohki Mametani's user avatar
0 votes
1 answer
683 views

How to use the lastb command from Mac terminal?

In bash on mac, when trying to list recent bad logins, the lastb command is unrecognized, while it works fine on my Linux machine. Does it need to be installed or is it a different command for macs?
pretzlstyle's user avatar
9 votes
2 answers
34k views

How to launch Chrome with explicit "hardware acceleration" setting?

There is an advanced setting in Google Chrome to toggle "hardware acceleration." On a Mac, I want to be able to choose whether Chrome launches with this option on or off. Any way to do this? (from ...
d0g's user avatar
  • 2,300
17 votes
7 answers
17k views

Any way to avoid dot-slash when running executable scripts in bash?

let's say I have a script. chmod +x myscript Now to run this I go ./myscript But is there any way I could just run it by typing myscript ???
foreyez's user avatar
  • 398
2 votes
3 answers
10k views

How to switch between command-line and GUI in VM on a Mac?

I have installed CentOS 7.1 in VMware Fusion of my Mac. I logged into the terminal (default runlevel 3) and started the GUI using the command "startx". I want to switch back to the terminal. Ctrl+Alt+...
user1897373's user avatar
0 votes
1 answer
434 views

Cat and/or echo several things into one file on "one command line"

I know we can do things like this: stat -f%z mybigfile > RELEASENOTES.txt and echo "bytes" >> RELEASENOTES.txt Now RELEASENOTES.txt will look like this: 47556304 bytes How can I get "...
Jonny's user avatar
  • 555
0 votes
2 answers
343 views

Mac OS .bash_profile errors

I'm running Mavericks 10.9.5 and I have tried to install Metasploit from this guide. It was until the Install Homebew I used echo PATH=/usr/local/bin:/usr/local/sbin:$PATH >> ~/.bash_profile ...
Renzo's user avatar
  • 1
1 vote
0 answers
78 views

In the Terminal is there a way to search for a command you previously entered? [duplicate]

In the Terminal is there a way to search for a command you previously entered? Say you typed something in just a moment ago, you can press the up arrow. But if you typed it in hours ago, or a day ...
user391339's user avatar
  • 1,039
1 vote
2 answers
2k views

Choose which binary is default binary on Mac OS X Mavericks

I have installed the latest SVN 1.8 via homebrew on my Mac. However now If I run svn --version I get back that I have 1.7. Next thinng I run which -a svn which then shows me I have it twice: /usr/bin/...
Dominik's user avatar
  • 143

15 30 50 per page