Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
3 answers
71 views

display path to files with same names

with this command in Terminal: ls -R |sort | uniq -d | sort -r I can display a list of files with the same names located in the running directory and subdirectories. But I would like to display also ...
all2alb's user avatar
5 votes
1 answer
481 views

Unix script with a trap inside ssh

My plan is to write a script to debug a remote web server. Since the debug port is blocked by the firewall, I need to forward the remote port via ssh to my local machine. This part is working fine. ...
Johannes von Zmuda's user avatar
0 votes
1 answer
203 views

See htop tree evolve in slow-motion

Using htop and its tree view (trigger by t or F5) one can see processes by parenthood, and layout the relations between them as a tree. Is there a way to see how the process tree evolves in slow ...
Michael's user avatar
  • 103
1 vote
1 answer
249 views

zsh alias for running the most recent matching history item

I'd like to create an alias in zsh that runs my last terminal command beginning with node. I can run that command with !?node, but I can't create an alias with alias N='!?node'. How can I make this ...
Raffi's user avatar
  • 163
2 votes
1 answer
233 views

Does the slave pseudoterminal use the line discipline?

According to this article: the line discipline instance is not evoked when the TTY driver is sending user program output to PTY master and the accompanying diagram. However, according to a different ...
jackmiller's user avatar
1 vote
1 answer
59 views

What makes a new command line (i.e. user@machine:~/directory$) appear in the terminal?

I am writing a Python program and when I interrupt this program, it unfortunately prints lines after the new dollar line has been printed. It looks something like this: [INFO]: Program finishing... ...
Simayy's user avatar
  • 13
0 votes
0 answers
37 views

Can't run any useful commands in terminal

I recently found an Arcom Viper at an auction specifically a VIPER-400-M64-F32 with an ICE enclosure. Upon connecting to the device through its COM port using putty I am greeted with this screen From ...
Austin's user avatar
  • 121
1 vote
0 answers
479 views

grep and awk are not displaying output in terminal

When trying to grep Record in .txt file simply $ grep 'Record' file.txt $ it goes to the next line without any output or error (I've tried to write output in file, but it is empty) I've tried also to ...
G D's user avatar
  • 11
0 votes
0 answers
82 views

Run Script Terminal Commands Orderly

how do i run the script below orderly ? (execute task after 1 task is done) Code 1 for i in *.mp4; do name=`echo "$i" | cut -d'.' -f1` echo "$name" ffmpeg -...
zaqquater's user avatar
2 votes
3 answers
522 views

Command line: merge and keep all info from the two files

How to merge and keep all info from the two files as such ? $ cat file1.txt apple cool dude flan $cat file2.txt apple ball cool dude elephant for a result as such : $cat ...
Virginie V's user avatar
0 votes
2 answers
457 views

Do Multiple Subprocesses Utilize Multiple Cores?

I have a question and it's basically exploring some lazy ways to utilize all the cores on a machine. Say I have program "./theprogram" which acts on a data set D, is "embarrassingly parallel", and ...
Sidharth Ghoshal's user avatar
1 vote
1 answer
3k views

How to fix “Operation not supported” on mac os

I am trying to install the Flutter onto my computer onto an external drive I have followed the instructions on their website to try and install it. https://flutter.dev/docs/get-started/install/macos. ...
Devin Tripp's user avatar
2 votes
1 answer
1k views

open a random file in osx with command line

I'd like to open a randomly selected file via the terminal. I found shuf, which seems to be just the utility that I need, although I cannot figure out a way to make the command I'm working with ...
jml's user avatar
  • 257
0 votes
1 answer
1k views

How to use Traceroute --mtu on Mac

I am trying to do the following Traceroute --mtu google.com however I get a usage: traceroute [-M first_ttl] etc giving me all the command lines. How can I use --mtu with traceroute on mac? I am ...
rex's user avatar
  • 3
3 votes
1 answer
1k views

Bash autocomplete with wildcard

I would like to type in the terminal like I do in emacs: emacs 2019-*subject* When I hit Tab I get the first match: 2019-08-03-subject.markdown What I would like is for it to show me the options ...
Pandian Le's user avatar
1 vote
1 answer
216 views

How to make command line tool “ctpu” be recognized by my terminal?

I downloaded the ctpu command-line tool made by Google. This tool makes it easy to set up and run Cloud TPUs for deep learning projects. I successfully downloaded the tool to my ~ directory (Users/...
parrot15's user avatar
  • 111
0 votes
1 answer
221 views

I don't see my mounted DVD being listed when I use the ls command to list all that's on my Desktop

I don't know if I did something wrong, but I was able to see the mounted DVD label name in Terminal when I did the ls command earlier while in my Desktop directory, now I can't, even though the DVD is ...
adrah's user avatar
  • 1
0 votes
2 answers
99 views

Unusual prompt in the terminal

I have a really unusual prompt in my Unix terminal (I'm using macOS). It looks like this: myUserName@Galaxy-A7-2016 I've never seen the @Galaxy-A7-2016 bit before and I'm worried someone might have ...
matzar's user avatar
  • 103
1 vote
2 answers
73 views

Bash - Same commented line each time I launch a bash terminal

It's been nearly a year that, each time a launch my bash terminal I get the following line at the beginning : ## cd /Users/Julien/Documents/ENSIIE/Projets/S4/MESIM_Rendu1/wetransfer-19f358/Random ## ...
JKHA's user avatar
  • 181
1 vote
1 answer
247 views

Accidental Unix Mac Terminal Commands

I accidentally used the following commands in terminal: In recovery mode: nvram boots-args="x" In a user profile in terminal: (a) sudo nvram boots-agr="" and (b) sudo nvram boots-args="", and then ...
Bobi's user avatar
  • 111
2 votes
1 answer
355 views

Is there a way to have a dynamic system status area in the Linux terminal that updates while one does something else?

I'm thinking for some servers I look after, that after I SSH in to the box it would be very helpful to see things like disk usage, CPU usage and the such in the actual terminal I'm in as I’m working. ...
idic's user avatar
  • 21
4 votes
2 answers
2k views

Is there a way to restart mac without reopen all apps via terminal?

I'm familiar with $ sudo shutdown -r now but I wonder is there a way to restart without reopen all apps?
Alexander Rodin's user avatar
1 vote
2 answers
994 views

Getting Unix path of multiple files/folders in Automator service

I want to get path of (multiple) file(s, folders) in Automator service by selecting them in Finder and then use them in shell command. I already have something like this: Launch AppleScript: on run ...
COOL_IRON's user avatar
0 votes
0 answers
193 views

Increase column width for iotop

Currently I'm using the iotop command to get snapshots of what my system is doing like so: sudo iotop -C 10 20 > iotop.txt However, in the output file, The text looks like this: 2017 Oct 14 16:...
rcplusplus's user avatar
0 votes
2 answers
205 views

After `script` command gives a file, in vim I use `:set isprint=1-225` to remove non-printable characters yet can't save the file in this format

When in vim I execute this command :set isprint=1-225 all the non printable characters are condensed/removed. Now how can I save this file or convert the format of this file so that by default this ...
Shér's user avatar
  • 1
1 vote
0 answers
3k views

How do I install libraries for Python3 through Cygwin?

I'm trying to set up an environment in Windows 10 where I can program in Python 3 and utilize libraries and modules as I please. I am seemingly unable to achieve this through Cygwin. EDIT: I have ...
Loke Gustafsson's user avatar
1 vote
1 answer
4k views

OS X open new terminal from command line that works in linux too

I'm creating npm scripts for a node based project, and I would like to create a script that first opens a new terminal, and then executes that command there. I'm using a mac myself, but the other devs ...
Ville Miekk-oja's user avatar
-1 votes
1 answer
6k views

Differences between Mac Terminal and Windows Command Line in terms of commands capabilities? [closed]

As a Newbie in learning to use Mac Terminal which runs UNIX commands there are differences with Windows Command Line which is based on MS-DOS System commands. What is the main differences between ...
Oghli's user avatar
  • 99
1 vote
1 answer
134 views

Write to file most common words by counter with linux

I want to write to a file the words that appear at least X times in the text. For example, for: a b a c b and X = 2 I would get: a b
Shani Gamrian's user avatar
6 votes
2 answers
20k views

How to set the Linux terminal NOT to scroll down automatically when a running program outputs data to the terminal? [duplicate]

Is it possible to set the terminal NOT to scroll down to the last line when the program that is currently running outputs data on the standard output ? I have a program that is running and is ...
yoyo_fun's user avatar
  • 1,863
2 votes
2 answers
1k views

How to sort java's .property file containg <key> = <value> by <value> column?

How can I sort this property file from java project by its value column? The value contains tabs or spaces before or after the value. Here is how this file looks like, key1 = value1 key2 = ...
Kashyap Kansara's user avatar
0 votes
1 answer
238 views

Regarding files resulted in equating file properties in "ls" command

I have a folder in which there are thousands of images. Of those thousand images, I want to bring together all those images whose “Last created” and “Last modified” properties are exactly same. ( In ...
user607694's user avatar
1 vote
1 answer
49 views

Select a specific part of the output and use it to rename files

I'm currently sorting files I recovered from a broken filesystem. They now all have filenames that go something like this: f123123123.xls If I run: file "f123123123.xls" it gives me a lot of ...
Joël Mettler's user avatar
2 votes
0 answers
781 views

Format external drive in single user mode mac os x

I am looking for suggestion to format external volume in Single User Mode. diskutil eraseDisk didn't work in such environment, so is there any possibility to format usb memory stick from Single User ...
Anthony's user avatar
  • 21
0 votes
0 answers
311 views

Split and encrypt a folder before uploading online for backup

I'd like to try out BackBlaze B2 to back up 400 GB of files. However, I'd like to zip and encrypt before uploading. Requirements split a folder to multiple folders (folders contain videos and images)...
jonmecer's user avatar
  • 101
1 vote
1 answer
2k views

Terminal: How to list current directory while typing out a path

I'm not sure how to phrase this correctly but I want to know how in the terminal to do the equivalent of 'ls' when typing out a path. So for example i'm typing in: sudo "/Library/Application\ ...
Jacob2471's user avatar
51 votes
3 answers
28k views

How to freeze the list of processes in htop?

I'd like to stop refreshing the list of processes. My problem is it refreshes itself too often. How can I do it? I use htop.
user1871996's user avatar
1 vote
1 answer
231 views

Why does CTL-3/CTL-# equal CTL-[? (and others) in the case of ASCII control characters

I've been rediscovering ASCII control characters as I fiddled with some terminal emulation code, and wrote a small program that outputs the hex value of each key I press (tcsetattr() with ~ICANON). ...
John de Largentaye's user avatar
2 votes
2 answers
2k views

Does it matter how many spaces exist in terminal commands?

For those of us humans trying to learn terminal languages and codes, does it matter how many spaces are or are not included in the commands and scripts of various languages? For instance, is there any ...
grad student's user avatar
0 votes
1 answer
320 views

Using “tr” command hides the working directory

When I run the tr command in terminal as tr -d text My cursor performs a carriage return but the working directory line disappears. I cannot run commands afterwards unless I ctrl+c. What is ...
Needs More Documentation's user avatar
5 votes
1 answer
3k views

Talk command only shows "Checking for invitation on caller's machine"

The talk command on Yosemite doesn't work and the /etc/inetd.conf file is nowhere to be found. Why is this file no longer included with OS X and why doesn't talk work anymore? Running talk just says: ...
Bob's user avatar
  • 61
42 votes
7 answers
44k views

Bash History Not Preserved Between Terminal Sessions on Mac

My bash history mysteriously stopped working, and I have no idea how to fix it. This is what my .bashrc looks like: HISTSIZE=500 HISTFILESIZE=500 HISTFILE=$HOME/.bash_history However, when i run ...
user avatar
0 votes
1 answer
698 views

set fileformat=unix permanantly

When I built WSO2 product pack from terminal using maven clean install and going to run from terminal by issuing below command at product home directory ./bin/wso2server.sh I got below error -bash:...
lakshman's user avatar
  • 839
0 votes
1 answer
121 views

Running script according to Terminal Context

Is is possible to get the current context, or front-most user-facing process, to trigger a script when it changes? For instance, the user starts with the command prompt, then goes into Emacs quits ...
cannyboy's user avatar
1 vote
2 answers
1k views

How To Make A Sparse File On Android With Terminal

I'm trying to make a sparse file on android. For this I'm using Android Terminal Emulator. I have installed Busybox so I can use the dd command. Other commands like truncate aren't installed. My ...
Jaïr Paalman's user avatar
4 votes
4 answers
3k views

What is a backslash colon doing in this chown command?

What is the \: doing in the command below? sudo chown nobody\: folder/ Is it some kind of mistake?
dryhay's user avatar
  • 43
1 vote
1 answer
3k views

Printing unique lines with uniq, OS X Yosemite

I am trying to print the unique entries in a column of a .csv file. For this, I tried the following: awk -F "," '{print $6}' dataCoarse.csv | uniq -u which just prints the 6th column as it is. There ...
sodiumnitrate's user avatar
1 vote
1 answer
2k views

How to correct malfunctioning Terminal in Mac OS X?

I am using Mac OS X 10.10.2 (Yosemite)—not a server version of the OS—and standard “Terminal” commands like ls, sudo, cp, mv, rm are no longer recognized in my Mac “Terminal.” I face this problem ...
DUKE's user avatar
  • 210
2 votes
3 answers
2k views

Apparent .bash_profile and .profile conflict in Mac OS X

I have an issue where, when I load up new terminal windows, I have to source the ~/.profile to get my PHP path working correctly. In essence of my issue is getting terminal to use MAMP PHP and MySQL ...
Tim Plummer's user avatar
2 votes
2 answers
2k views

Terminal window scrollback buffer using screen utility

I am used to using screen on UNIX (AIX/Solaris) at work. I've installed it on my two home boxes running Ubuntu and Debian. The only difference I notice is that when I scroll up in the terminal window ...
Mike's user avatar
  • 168

1
2 3 4 5