Most Popular

1500 questions
75
votes
8 answers

Making zsh default shell without root access

I am using my school's computers and would like to use zsh instead of bash. I'd like to make it the default shell, but I cannot run a command such as $ chsh -s $(which zsh) because I don't have admin privileges. Is there a way I can put something…
goodcow
  • 903
  • 1
  • 7
  • 6
75
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,021
  • 2
  • 10
  • 15
75
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
  • 33,607
  • 8
  • 85
  • 110
75
votes
4 answers

How to find power draw in watts?

I've been asked to estimate the power consumption of the servers I run for my laboratory. I thought that I'd ask if there was some handy Linux commandline to get the power consumption of the server. It looks like powertop is useful for minimizing…
speciousfool
  • 897
  • 1
  • 6
  • 6
75
votes
5 answers

Pronunciation for /usr directory

How do you pronunce /usr? I found in the net that someone reads it "user"... but, for what I know, this directory is not related to the user. The meaning of the acronym is "Unix specific (or system) resources". How can we better read it, making it…
bluish
  • 973
  • 2
  • 7
  • 14
74
votes
10 answers

How to allow non-superusers to mount any filesystem?

Is it possible to allow some particular users (e.g. members of a group) to mount any filesystem without superuser privileges on Linux? Another question might have been "in what ways a user can harm a system by mounting filesystems?"
user27225
74
votes
6 answers

Concatenating two variables with an underscore

I need to concatenate two variables to create a filename that has an underscore. Lets call my variables $FILENAME and $EXTENSION where filename is read from a file. FILENAME=Hello EXTENSION=WORLD.txt Now... I have tried the following without…
Rhyuk
  • 1,095
  • 2
  • 8
  • 10
74
votes
3 answers

'ps' arguments to display PID, PPID, PGID, and SID collectively

I tried ps with different kinds of switches e.g. -A, aux, ef, and so forth but I cannot seem to find the right combination of switches that will tell me the Process ID (PID), Parent Process ID (PPID), Process Group ID (PGID), and the Session ID…
JohnMerlino
  • 5,941
  • 11
  • 34
  • 38
74
votes
4 answers

convert a hex string to binary and send with netcat

I have a binary file that I can send with netcat: $ nc -l localhost 8181 < my.dat The file contains this: $ xxd my.dat 0000000: 0006 3030 3030 4e43 ..0000NC What I really want to do is send the hex string directly. I've tried…
Chris Snow
  • 4,046
  • 4
  • 23
  • 30
74
votes
22 answers

Is there a robust command line tool for processing csv files?

I work with CSV files and sometimes need to quickly check the contents of a row or column from the command line. In many cases cut, head, tail, and friends will do the job; however, cut cannot easily deal with situations such as "this, is the first…
Steven D
  • 45,310
  • 13
  • 119
  • 114
74
votes
4 answers

How can I remove an element from an array completely?

unset array[0] removes the element but still if I do echo ${array[0]} I get a null value moreover there are other ways of doing this but if an element of an array contains spaces like below array[0]='james young' array[1]='mary' array[2]='randy…
munish
  • 7,825
  • 24
  • 71
  • 97
74
votes
3 answers

Shebang line with `#!/usr/bin/env command --argument` fails on Linux

I've got a simple script: #!/usr/bin/env ruby --verbose # script.rb puts "hi" On my OSX box, it runs fine: osx% ./script.rb hi However, on my linux box, it throws an error linux% ./script.rb /usr/bin/env: ruby --verbose: No such file or…
rampion
  • 1,589
  • 1
  • 10
  • 14
74
votes
3 answers

yum install in user home for non-admins

I am a non-admin user on a large computer system. I need some up to date packages that are not installed on the system. I want to use yum to install them. As a user without sudo, admin, or root access, can I use package management to install…
highBandWidth
  • 873
  • 1
  • 7
  • 7
74
votes
5 answers

What is D-Bus practically useful for?

dbus is supposed to provide "a simple way for applications to talk to one another". But I am still not sure what it is useful for, practically. I have never seen a situation where dbus is useful, I only see warnings that some dbus component has…
400 the Cat
  • 819
  • 4
  • 37
  • 85
74
votes
5 answers

How to scroll the screen using the middle click?

On Windows, most programs with large, scrollable text containers (e.g. all browsers, most word processors and IDEs) let you press the middle mouse button and then move the mouse to scroll. This scrolling is smooth and allows you to scroll very…
Mark Amery
  • 2,860
  • 6
  • 22
  • 29