Most Popular
1500 questions
102
votes
11 answers
How do I echo just 1 column of output from ls command?
Lets say when I do ls command the output is:
file1 file2 file3 file4
Is it possible to display only a certain column of output, in this case file2? I have tried the following with no success:
echo ls | $2
Basically all I want to do is echo only…
John
- 3,459
- 13
- 29
- 25
101
votes
2 answers
Make xargs pass as first parameter
I'm trying to produce this behaviour:
grep 192.168.1 *.txt
By passing a string into grep via Xargs but it is going on the end instead of as the first parameter.
echo 192.168.1 | xargs grep *.txt
I need to tell xargs (or something similar) to put…
andy boot
- 1,163
- 2
- 9
- 8
101
votes
5 answers
What is the point of sshd “UseDNS” option?
I know what it does, but I don't know why. What attack(s) does it prevent?
Is it relevant for all kind of authentication methods? (hostbased, password, publickey, keyboard-interactive ...)
user368507
- 2,143
- 4
- 19
- 17
101
votes
5 answers
Remove line containing certain string and the following line
I use this
cat foo.txt | sed '/bar/d'
to remove lines containing the string bar in the file.
I would like however to remove those lines and the line directly after it. Preferably in sed, awk or other tool that's available in MinGW32.
It's a kind of…
jakub.g
- 3,153
- 5
- 20
- 17
101
votes
12 answers
Which MP3 tagging tool for Linux?
Which application would you recommend for Linux to tag MP3s? Under Windows I used to use Tag&Rename and liked it a lot; it works well under Wine, but I want something that runs natively.
tkit
- 2,398
- 4
- 21
- 27
101
votes
4 answers
Restart bash from terminal without restarting the terminal application (mac)?
I've looked around and bit for an answer to this question but I don't seem to find it (which is weird).
My question is, is there any simple way to restart the BASH session from within the terminal on Mac. I just want the same behaviour as if I…
Mattias
- 1,527
- 3
- 13
- 14
101
votes
3 answers
Rebuild auto-complete index (or whatever it's called) and binaries in $PATH cache in zsh
After installing new software, an already opened terminal with zsh won't know about the new commands and cannot generate auto-complete for those. Apparently opening a new terminal fix the problem, but can the index (or whatever you call it) be…
phunehehe
- 20,030
- 27
- 99
- 151
101
votes
6 answers
How do I kill all a user's processes using their UID
I want to kill all running processes of a particular user from either a shell script or native code on a Linux system.
Do I have to read the /proc directory and look for these?
Any ideas? Is there a dynamic mapping of the pids under UIDs in Linux?…
user489152
- 1,113
- 2
- 9
- 6
101
votes
8 answers
Does /usr/sbin/nologin as a login shell serve a security purpose?
In my /etc/passwd file, I can see that the www-data user used by Apache, as well as all sorts of system users, have either /usr/sbin/nologin or /bin/false as their login shell. For example, here is a selection of…
Mark Amery
- 2,860
- 6
- 22
- 29
101
votes
7 answers
command to determine ports of a device (like /dev/ttyUSB0)
I have a question regarding the ports in Linux. If I connect my device via USB and want to check its port I can't do it using the command lsusb, which only specifies bus number and device number on this bus:
[ziga@Ziga-PC ~]$ lsusb
Bus 003 Device…
71GA
- 1,056
- 5
- 18
- 38
101
votes
6 answers
Difference between ls -l and ll?
I'm relatively new to programming as a whole and some tutorials have been telling me to use ls -l to look at files in a directory and others have been saying ll. I know that ls is a short list, but is there a difference between the other two?
Jon
- 1,131
- 2
- 7
- 7
101
votes
4 answers
What is difference between GTK and QT applications?
Many packages are available in both GTK and QT versions.
What's the difference between them?
Is there any difference in
performance or working method?
Pandya
- 23,898
- 29
- 92
- 144
101
votes
10 answers
How do I split a flac with a cue?
I've got a full album flac and a cue file for it. How can I split this into a flac per track?
I'm a KDE user, so I would prefer a KDE/Qt way. I would like to see command line and other GUI answers as well, but they are not my preferred method.
xenoterracide
- 57,918
- 74
- 184
- 250
101
votes
8 answers
rsync ignore owner, group, time, and perms
I want to know how use rsync for sync to folders recursive but
I only need to update the new files or the updated files (only the content not the owner, group or timestamp) and I want to delete the files that not exist in the source.
alsanal
- 1,113
- 2
- 8
- 4
100
votes
4 answers
What's the difference between SFTP, SCP and FISH protocols?
I used to think SCP is a tool to copy files over SSH, and copying files over SSH is called SFTP, which is itself a synonym to FISH.
But now as I was looking for a Total Commander plugin to do this in Windows, I've noticed that on its page it says…
Ivan
- 17,368
- 35
- 93
- 118