Tag Info

New answers tagged

2

Using sed Starting with this file: $ cat >file EXIT_ON_GEN="true" //exit on successful generation of text file if true One method for changing true to false (and displaying the new version on the terminal) would use sed: $ sed 's/^EXIT_ON_GEN=[^[:space:]]*/EXIT_ON_GEN="false"/' file EXIT_ON_GEN="false" //exit on successful generation of text file if ...


0

I changed permissions to the script and the script: chmod u+x /path/to/script.sh and was able to execute the script. I'm not sure if it was necessary to change to root user, but I changed to root throughout the process


0

To source a file if it exists in one line: [ -f .aliases ] && source .aliases


1

You have several choices. You can use the .local domain name, which is reserved for machines that are not accessible from the Internet. (You can use it on a machine that can make outgoing connections to the Internet, or even from a machine that can but normally doesn't receive incoming connections from the Internet.) This name is reserved for that use, it ...


0

Domain name or host name? The full hostname is the local machine name prepended to a domain like host.example.com. (I am fuzzing over some details, but close enough.) So, the two questions are what to name the host, and what to name the domain. Idealy the full hostname should be globally unique. (Again there are some esoteric exceptions.) The way we ...


0

It can be whatever you want. Some people chose to name multiple servers following themes, such as characters/locations from your favourite movie/book/game. Otherwise more logical naming might be useful; if it's your personal dev box you might just want to call it dev-01 and your next dev-02 and so on. It's essentially just for your convenience.


1

I just forced my VSFTPD to run only in active mode and that seemed to have worked for me. To do that put the following line in your config file: pasv_enable=NO


0

I use to create a subdirectory under opt with the name of my app and under this I put temporary and auxiliary files that my application use.


1

I have a GUI application (using wxPython) that imports data from elsewhere before processing two to seven data files to produce a CSV file, a PDF report and, if selected, a number of other report formats. I store the source data files (until archived) and reports in directory structures in $HOME/Documents. This works well but you have to stress to Users that ...


1

You can write a bash script that uses rsync to sync/copy your config files or folders and run it after you change something. example: $ rsync -az --progress --size-only /home/test/* server.example.com:/home/test/destination/ explained: -a archive, preserves all attributes like recursive ownership, timestamps, etc -z compress, saves bandwidth but is ...


1

As pointed out by Wieland, the /etc/conf.d/memcached file was removed when the package was changed to use a systemd unit. The /etc/conf.d directory was used by SysVinit, and hence no longer applicable. The options for the service can be edited by editing the systemd unit. The recommended way to do this is to run systemctl edit memcached.service --full. This ...


0

If you can afford to install external tools, than I would recommend Augeas - this is the only tool for working with config files you will ever need. It represents configs as a tree. Read more here.


4

From Debian's bash README: What is /etc/bash.bashrc? It doesn't seem to be documented. The Debian version of bash is compiled with a special option (-DSYS_BASHRC) that makes bash read /etc/bash.bashrc before ~/.bashrc for interactive non-login shells. So, on Debian systems, /etc/bash.bashrc is to ~/.bashrc as /etc/profile is to ...


1

From man bash: When an interactive shell that is not a login shell is started, bash reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if these files exist. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ...



Top 50 recent answers are included