The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [unix-utils]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
31 views

Batch renaming files that contain tracks in an album

I tried to use rename 's/^([0-9]{2})/$1./' * to add a dot after the track numbers but the command hung. With -v it gives Reading filenames from file handle (GLOB(0x562d437194b8)) and then hangs. ...
0
votes
2answers
40 views

How to run the “other” executable matching the same name found in PATH?

Is there a concise way to call the "other" executable for find available in path that can be found with where? C:\repos>where find C:\Windows\System32\find.exe C:\Program Files\Git\usr\bin\find....
0
votes
1answer
37 views

Date a GNU/Linux or Unix program was first released [closed]

When I uncover a new command, most recently column, I am curious as to how long this command has existed -- in appreciation of the longevity of Unix, its dedicated developers, and my own ignorance! ...
0
votes
1answer
142 views

How to verify forward confirmed DNS status with a single command?

If I want to verify that an IP resolves to its DNS name and vice versa I usually run two commands. Like so... $ host 8.8.8.8 8.8.8.8.in-addr.arpa domain name pointer google-public-dns-a.google.com. $...
0
votes
1answer
85 views

what's the least-painfull way to have less on Windows?

I want to use less, instead of more, on a Windows machine. I know I can install Cygwin and use its less. But I've also noticed there's GnuWin which offers a less, a stand-alone less, and there are ...
0
votes
1answer
452 views

Does set timeout change each expect statement, or just the final expect eof?

I'm learning to use /usr/bin/expect for the first time, to automate the nightmare that is installing fink from source, as that script has a few dozen prompts, all of which can be answered with the ...
1
vote
0answers
28 views

`column` colors broken with linux-utils 2.30

I am using the column command to parse the output of a git for-each-ref. With linux-utils 2.29 everything works, but with 2.30 colors are not rendered in my terminal: git for-each-ref --sort=-...
0
votes
1answer
36 views

Find strings that do not appear in a repository

Problem: I have a moderately large repository (1000s of files, hundreds of thousands of lines). I have a text file with ~5000 lines. I need to find the lines in the text file that do NOT appear ...
1
vote
1answer
4k views

wget: unrecognized option `--no-check-certificate' on windows

Despite being advised to use --no-check-certificate option with wget, I get this error that the option is not recognized. What do I do? wget: unrecognized option '--no-check-certificate'
0
votes
1answer
116 views

Cygwin unix-utils version of rename not functioning as it should

I'm trying to use the rename function, supplied as part of cygwin, unix-utils ( Mar22 2015), and it does not function as advertised. All the examples I've seen indicate this to be the syntax: rename ...
1
vote
1answer
159 views

Why does grep -r --include=*.js * > dirname/.filename not write all .js files to a single file?

I am trying to put all js files in a directory and sub directorys into a single file in lexical order. What did I do wrong?
9
votes
4answers
23k views

ls: cannot access file: No such file or directory

Context: I added a drive to my machine, and for whatever reason, I am unable to access a directory(?) on it. ls -l ls: cannot access Downloads: No such file or directory total 56 d????????? ? ? ?...
3
votes
2answers
2k views

Count lines fast

I'm running Windows 7 and have GnuWin32. I have a several-gigabyte text file with LF (\n) line endings. I want to know how many lines it has (or alternatively how many LFs it has, which is, let's say, ...
1
vote
0answers
897 views

Adding a line to an XML file after specific Tags

How would you guys go about adding a line to a bunch of XML files after certain tags? Solution can be based in usage of unix tools or name a text editor or utility that could allow me to do this ...
1
vote
2answers
55 views

Excluding a file from UNIX “find” results based on existence of another file

I have a big bunch of directories, each with a series of .pdf files. Some of these files have successfully converted to .csv, some have not. An example directory listing using find ./: ./test5.pdf....
19
votes
3answers
4k views

Why does redirecting the output of a file to itself produce a blank file?

Why does redirecting the output of a file to itself produce a blank file? Stated in Bash, why do less foo.txt > foo.txt and fold foo.txt > foo.txt produce an empty foo.txt? Since an ...
0
votes
1answer
268 views

How to extract a specific file without its folder structure using the 7za command

I have a zip file (my.zip) consisting of 4 files: mydata_20050523-20130113.csv mydata_20050523-20130113FileHeader.csv my Data Association - Code Values.pdf my Data Association - Readme.pdf out of ...
35
votes
5answers
41k views

Opposite of tail: all lines except the last n lines

How can I discard the last n lines of a file with a unix command line filter? That would be sort of the opposite of tail: tail discards the first n lines but pipes the rest through, but I want the ...
3
votes
0answers
2k views

pronunciation of 'ctl' in commands like 'systemctl' [closed]

There are sorts of commands like 'systemctl', 'hostnamectl', or 'jounralctl'. I realize that 'ctl' is shorthand for control, but I'm wondering what the generally accepted pronunciation of 'ctl' is.
4
votes
1answer
433 views

why do *NIX commands have such “insane” (counterintuitive) defaults (philosophical pondering)? [closed]

Why do most *NIX commands my (experience is Linux mostly and rare encounter with FreeBDS) have such "insane" (unintuitive) default, behaviours, i.e. VERY different from what the "equivalent" GUI ...
2
votes
1answer
168 views

how to compare contents of video files?

I have many videos with different encoding. I know some of them have the same content. So here's my need: is there a linux tool (command line oriented, with or without graphical front-end, open-source)...
10
votes
6answers
40k views

awk / sed to print only up to the underscore character

How can I use awk or sed to print a string only up to the first underscore character? Before: host100_044 2 host101_045 2 host102_046 2 After: host100 host101 host102
2
votes
1answer
212 views

Why is `bc` ignoring my `obase`?

>>> bc bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. ibase = 16 obase = 56 ...
1
vote
1answer
241 views

Identifying a file with “file” in a shell script?

I'm currently writing a shell script that needs to be able to identify the actual type of files (not their extensions) with the unix "file" utility. However, that tool outputs human readable text ...
-2
votes
1answer
2k views

What are the “hub” devices shown in my 'lsusb' output?

I ran lsusb on my Linux (Ubuntu) machine and here is my result: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 ...
7
votes
3answers
4k views

why doesn't unix's du(1) command support -i for inode measurement?

Is it simply because going from filenames to inode numbers is difficult in userspace, and you can't read inodes from there?
1
vote
2answers
237 views

Is there an equivalent of the unix 'look' command on Windows?

I'm looking for an equivalent of the unix look command, which searches a text file for lines beginning with a given prefix. In particular, it has an option for a binary search within a pre-sorted text ...
6
votes
2answers
2k views

How do I install 'rev' in Cygwin?

The Unix rev utility reverses lines in a file. How do I get this under Cygwin? Which package do I need to install?
1
vote
4answers
15k views

How to kill all the processes that have dates older than today?

I issue the command ps -aux | grep tony. It displays the following output tony 10986 0.0 0.0 33532 464 ? S Feb01 0:00 vncconfig -iconic tony 10988 0.0 0.0 86012 512 ? ...
9
votes
2answers
3k views

How can I change the order of GNU Screen “screens”?

I am currently using the GNU Screen tool. Now my question is whether there is a way to organize or rather change the order of the screens/ screen list displayed at the bottom of my console window. I ...
25
votes
5answers
6k views

Flashing window in gnu screen

I really like gnu screen but there is a problem in my environment when I use it. Examle: username@domain:/var/www$ l Display all 130 possibilities? (y or n) when you click [Tab] to perform ...