Tagged Questions
2
votes
1answer
29 views
Linux one-liner to find the largest recurring group of lines in a text file?
I have a log containing an execution trace where there is infinite recursion eventually terminating when the stack is too deep. There are enough lines and valid included recursion within the larger ...
0
votes
0answers
25 views
How to use grep command to find the matching pattern and some more characters? [duplicate]
I have a compressed JS code and I want to find a pattern, but since the file is compresses, it has only a line, and the match pattern is all the file. The output is too much large.
grep -r ...
1
vote
1answer
64 views
Script to delete text files
I was trying to make a script that searches for all ASCII text files in the directory that you give and after that writes path of every file to a text file. After that it suppose to show head of each ...
0
votes
1answer
37 views
How to pass wildcards in command line [closed]
So this works:
foo -a -b -c "path/file.ext"
And this too if I want to pass all files from directory:
foo -a -b -c path/*
But if I add the quotes
foo -a -b -c "path/*"
It doesn't work anymore: ...
4
votes
4answers
141 views
How can I see dmesg output as it changes?
I'm writing a device driver that prints error message into ring buffer dmesg output.
I want to see the output of dmesg as it changes.
How can I do this?
3
votes
2answers
61 views
cp -L vs. cp -H
Problem
When copying files with cp -H or cp -L, I get the same results:
$ ls -l fileA
fileA -> fileB
$ cp fileA somewhere/ -H
$ ls -l somewhere/
fileA # fileA is a copy of fileB, only ...
4
votes
3answers
77 views
convert soft- to hardlinks with cp
The cp command's infopage offers on the option --preserve= the following:
links
Preserve in the destination files any links between
corresponding source files. Note that with -L' ...
3
votes
3answers
119 views
How to bring up a wi-fi interface from a command line?
I can't figure out how to properly bring up the wi-fi card on my laptop. When I turn it on and issue
$ sudo iwconfig wlan0 txpower auto
$ sudo iwlist wlan0 scan
wlan0 Interface doesn't support ...
2
votes
1answer
51 views
Using Command Line (Linux) how do I enable the Bluetooth Adapter?
I have 1 BlueTooth adapter on my laptop. Using the command line, I want to be able to enable / disable it.
This would be the same functionality that is achieved using GUI -> Bluetooth settings -> ...
25
votes
6answers
738 views
Easy way to determine virtualization technology
I have command line access to a Linux machine which may or may not be virtualized. I want to determine what kind of virtualization technology it runs on, if any (VMWare, VirtualBox, KVM, OpenVZ, Xen, ...
1
vote
1answer
58 views
Best way to find the active wireless device
Of course I know the command:
iwconfig
which lists devices (and gives info about whether they have a wireless connection). For the purposes of a shell script, I'm really wondering, is there any way ...
1
vote
3answers
113 views
Which cmd is the best for determining the OS' word size (32/64)-bit? [duplicate]
I need to find my OS (not hardware) is 32-bit / 64-bit. Which command is best?
uname -p
uname -i
uname -m
arch
All the above commands returns the same answer:
On 32 bit systems: i686/i386
On ...
-1
votes
1answer
111 views
How to create a GUI in shell script without any third party libs just like setup command [closed]
How to create a GUI in shell script without any third party libs (like setup command)
3
votes
1answer
151 views
Command to transpose (swap rows and columns of) a text file [duplicate]
Is there currently a generic command that will "pivot" input.
e.g.
#labeled.file
name: bob
title: code monkey
name: joe
title: pointy haired
is converted to:
name title
bob code monkey
joe ...
1
vote
2answers
314 views
tar: short read
I get an error when I uncompress my tar.
I do this:
tar xvf VM_DECOMPTES.tar
and after some time I get the following error:
tar: short read
What is going wrong here?
tar: unrecognized ...