Join us in building a kind, collaborative learning community via our updatedCode of Conduct.

All Questions

Tagged with
3
votes
2answers
1k views

How do I use a graphical or text based EDITOR on linux based on logging in locally or remotely?

I can set my EDITOR variable in my .bashrc to e.g. gedit, which is a nice graphical editor on ubuntu. But when I log in over PuTTY that editor will fail.What is the best way to detect if I'm logged ...
2
votes
2answers
295 views

linux random password generator - repeat n times

dd if=/dev/urandom count=200 bs=1 2>/dev/null|tr "\n" " "|sed 's/[^a-zA-Z0-9]//g'|cut -c-16How do I repeat it set number of times?
0
votes
3answers
164 views

How to loop a script execution with param from a text file?

I need to run http://superuser.com/pythonScript keyword one time for each keyword in a text file, how can I do this from a gnome terminal? (without having to modify the pythonScript)pseudo code:for each keyword in ...
1
vote
1answer
1k views

Writing a bash shell script for website backup

I am about to write my first shell script for backing up my server.These are the steps I have identified so far.Copy files to be backed up to /srv/backup/run mysqldump and copy the file to srv/...
0
votes
2answers
135 views

How can I better manage my console windows?

I'm using Gnome/Debian and I'm constantly always opening new console windows ( I have my Windows key mapped to invoke gnome-terminal ).It's a bit frustrating because after a few hours of work I'll ...
2
votes
1answer
316 views

How to clear stale hashed search path in bash?

Previously my bash script was pointing to /path1 but I moved it to under /path2, now if I do "type myscript" it's still pointing to /path1, how do I solve this?
1
vote
1answer
348 views

checking which window is active in a Linux script

In a Linux bash script I can do several things with windows using wmctrl but I'm trying to figure out how to determine what the currently active window is.
79
votes
3answers
19k views

What does the 'rc' in `.bashrc`, etc. mean? [duplicate]

Well, this is embarrassing. I feel like I just realised I don't know a loyal colleague's name after working with them for 10 years. "Hey, er... *cough!*, thanks for that great job you did on setting ...
7
votes
2answers
3k views

Smart tab completion (for directories)?

Are there shell versions that have a more intelligent tab completion? I'd like to be able to type cd foo-<TAB>Then it would show me the possible completions along with numbers that I can ...
6
votes
2answers
7k views

What do I need to do to mount a USB drive in ArchLinux

What packages do I need to allow me to mount a USB drive in ArchLinux from the command line? What command do I use? Under Ubuntu these things happen automatically, but it's about time I learned how to ...
2
votes
2answers
617 views

Kill all Programs on a specific display

does anyone know how to kill all Programs on a specific X display?In example, I need to kill all Programs on Display :1. How is this possible?
5
votes
1answer
7k views

File encryption in a bash script without explicity providing password

I want to automate the following manual process.Currently, I am encryptying a set of files using openssl as follows:Encrypt file.txt to file.out using 256-bit AES in CBC mode$ openssl enc -aes-...
3
votes
2answers
14k views

How to use scp in a bash script without specifying password?

I am a bash newbie, and am writing a bash script that will allow transfer of files between two computers. BTW, is there a more secure alternative to scp?Currently, I am doing this manually, by using ...
0
votes
2answers
313 views

What is the equivalent of Solaris's passwd command in Linux?

What is the equivalent of Solaris's passwd command in Linux?
0
votes
1answer
96 views

How do i pass a variable to a function thats already being escaped?

What i want to do is create multiple informix sql statements & later run them via a bash script. Here is what i have so far (this works) but is meant to be run from a cron job so it only does ...

153050per page