Most Popular

1500 questions
81
votes
3 answers

Terminate dropped SSH sessions

My SSH sessions seem to be dropping though that is not my major problem - the major problem is my previous sessions are still alive, worse yet one of them is running visudo preventing me from accessing it! who shows a number of sessions all except…
markmnl
  • 1,081
81
votes
3 answers

What defines the maximum size for a command single argument?

I was under the impression that the maximum length of a single argument was not the problem here so much as the total size of the overall argument array plus the size of the environment, which is limited to ARG_MAX . Thus I thought that something…
Graeme
  • 34,721
81
votes
5 answers

Is it possible to save as root from nano after you've forgotten to start nano with sudo?

A lot of the time I edit a file with nano , try to save and get a permission error because I forgot to run it as root. Is there some quick way I can become root with sudo from within the editor, without having to re-open and re-edit the file?
Kit Sunde
  • 4,644
81
votes
3 answers

Changing a file's "Date Created" and "Last Modified" attributes to another file's

I'm using merge cap to create a merge pcap file from 15 files. For the merged file, I have changed the name to that of the first of the 15 files. But I would also like to change the merged file's attributes like "Date Created" and "Last Modified" to…
81
votes
7 answers

How do I get my mouse back from QEMU/KVM?

I'm running QEMU/KVM on Debian Testing x64 with this command: kvm -m 1024 -hda win7.img -cdrom win7x86.iso -boot d -net user But when I click inside the virtual machine, QEMU captures my mouse and won't let it go. I thought the key combination to…
Michael A
  • 1,773
81
votes
4 answers

Is there any difference between mode value 0777 and 777

I saw a code change at work, where the mode values were changed from 777 to 0777 to make nfs setattr work. What is the difference in the 2 values?
80
votes
3 answers

Why do the commands "dig" and "nslookup" sometimes print different results?

Why do the commands dig and nslookup sometimes print different results? ~$ dig facebook.com ; <<>> DiG 9.9.2-P1 <<>> facebook.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6625 ;; flags: qr rd ra;…
pylover
  • 3,628
80
votes
11 answers

How can I reliably get the operating system's name?

Say I am logged into a remote system, how can I know what it's running? On most modern Linuxes (Linuces?), you have the lsb_release command: $ lsb_release -ic Distributor ID: LinuxMint Codename: debian Which as far as I can tell just gives the same…
terdon
  • 254,405
80
votes
10 answers

How to bind USB device under a static name?

I have an Arduino which sometimes gets bound to /dev/ttyUSB0 and other times to /dev/ttyUSB1 , making my script fail. I do not want to enumerate all the possibilities of where my device could be, but I'd rather have it be bound somewhere static,…
k0pernikus
  • 16,769
80
votes
7 answers

Viewing Linux Library / Executable version info

In Windows, EXE and DLL have version info, including at least the following fields: file version product version internal name product name copyright In Linux Library / Executable: Which fields are present? How to view such info? What…
linquize
  • 1,089
80
votes
2 answers

What units of time does "top" use?

If I issue the "top" command and receive results such as: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 00001 bob 25 0 77380 1212 1200 R 95.8 0.0 89122:13 fee 00002 bob 25 0 77380 1196 1184 R 95.4 0.0 88954:14 fi 00003 sam 18 0 427m 16m 6308…
Abe
  • 1,691
  • 2
  • 13
  • 8
80
votes
7 answers

Can I change the font of the text-mode console?

I have a Unix-like OS installed without a windowing environment; i.e. , just a text-mode console and no GUI. Is it possible to change the font used by the console? To be clear, I am not talking about the terminal emulator that comes with a desktop…
Weihang Jian
  • 1,357
  • 2
  • 12
  • 18
80
votes
4 answers

What's the difference of dmesg output and /var/log/messages?

AFAIK dmesg shows information about kernel and kernel modules, and /var/log/messages also shows information produced by kernel and modules. So what's the difference? Does /var/log/messages ⊂ output of dmesg ? More Info that may be helpful: - There…
xanpeng
  • 5,985
80
votes
3 answers

How do I get xargs to show me the command lines it's generating without running them?

A fair number of linux commands have a dry-run option that will show you what they're going to do without doing it. I see nothing in the xargs man page that does that and no obvious way to emulate it. (my specific use case is troubleshooting long…
Andrew
  • 1,285
80
votes
7 answers

Crontab never running while in /etc/cron.d

Here's what I did on Debian Jessie: install cron via apt-get install cron put a backup_crontab file in /etc/cron.d/ However the task is never running. Here are some outputs: /# crontab -l no crontab for root /# cd /etc/cron.d && ls backup_crontab…
Jivan
  • 949
1 2 3
…
99
100