Tag Info

Hot answers tagged

15

change the age of password to 0 day syntax chage -d 0 {user-name} In this case chage -d0 foo This works for me over ssh also


9

LTR stands for Long Term Release. This is also known as a LTSR, short for Long Term Support Release. These releases are supported for a longer time, and are meant to be used in Production Environments, where stability is preferred over new features. In terms of the kernel you are reading about, the LTR cycle is about 3 years. This means if you are a user ...


8

From the Wikipedia page on the Filesystem Hierarchy Standard: Modern Linux distributions include a /run directory as a temporary filesystem (tmpfs) which stores volatile runtime data, and which is being considered for the next version of the FHS. According to the FHS version 2.3, this data should be stored in /var/run but this was a problem in some cases ...


7

Normally, a welcome message can be shown by customizing the /etc/motd file (which stands for Message Of The Day). /etc/motd is not a script but a text file which contents are shown before the first prompt of a login session. You can also add some messages in /etc/profile or /etc/bashrc scripts using the echo or print commands (note that the /etc/bashrc ...


5

The traditional way is to copy all files elsewhere and see which one triggers a read error. Of course, this does not answer the question at all if the error is hidden by the redundancy of the RAID layer. Apart from that I only know the manual approach. Which is way too bothersome to actually go through with, and if there is a tool that does this magic for ...


5

Debian and derivatives (Ubuntu, Linux Mint, …) The configuration for the kernel /boot/vmlinuz-VERSION is stored in /boot/config-VERSION. The two files ship in the same package, linux-VERSION or kernel-VERSION. Arch Linux, Gentoo (if enabled) The configuration for the running kernel is stored in the kernel binary and can be retrieved with zcat ...


4

Try: $ awk '1;/PPP/{exit}' file AAA BBB JJJ OOO 345 211 BBB OOO OOO PPP


4

These are Long Term Releases: There are usually several "longterm maintenance" kernel releases provided for the purposes of backporting bugfixes for older kernel trees. Only important bugfixes are applied to such kernels and they don't usually see very frequent releases, especially for older trees. Source: https://www.kernel.org/releases.html


4

I made a test recording like so: arecord -d 4 out.wav You could use dd like this: dd bs=1 if=out.wav | aplay Or use a really choppy unbuffered stream with a while loop: while read -n 2048 bytes; do printf "$bytes" | aplay done < out.wav You could then use netcat to redirect it to a socket or port. ...


4

Create a file in /etc/profile.d called greeting.sh or whatever you like. It does not need to be executable or contain a shebang. You need one line: echo "Hello World" You could also use: echo "All Hail the Flying Spaghetti Monster!" Etc. If you don't want to do this for every user, add it to ~/.profile or ~/.bash_profile, whichever works on your ...


4

This is well presented already in OpenSSH documentation such as man pages. In the configuration file ~/.ssh/config Host 123.4.5.67 User another On the command line: ssh -l another 123.4.5.67


4

I will try to answer questions as briefly as possible. The questions you are asking are usually addressed in introductory operating systems courses at universities but I will assume you have not taken such a course. Memory isolation for userspace processes is very desirable - not only to protect the kernel from malicious userspace programs, but also to ...


4

As it so happens, there is another significant interface with the kernel: the /proc and /sys virtual filesystems. While they do not hold regular files, their contents are direct gateways to the kernel: to act on them is to act directly on kernel-allocated memory. For instance, if you want to drop all memory caches, you may use... echo 3 > ...


4

From the lsof man page Lsof returns a one (1) if any error was detected, including the failure to locate command names, file names, Internet addresses or files, login names, NFS files, PIDs, PGIDs, or UIDs it was asked to list. If the -V option is specified, lsof will indicate the search items it failed to list. ...


3

Here are the commands you need to run, if you just want to get it done: sudo add-apt-repository ppa:git-core/ppa -y sudo apt-get update sudo apt-get install git git --version As of Dec 2014, I get git 2.2.0 that way, while the version in the Ubuntu Trusty repositories is 1.9.1.


3

This depends which tools are installed on the client device / supported by the kernel. Possible methods for file transfer (unordered): ssh / sftp encoding binary files into displayable format with base64/uuencode and then copy from/into your telnet terminal window. over a simple tcp connection with netcat or socat or with bash and /dev/tcp upload / ...


3

You have to sort using names first. Note: 'uniq' does not detect repeated lines unless they are adjacent. You may want to sort the input first, or use `sort -u' without `uniq'. You can use the -t/-k options, to sort these fields: sort -t',' -k 3 marathon that sort regarding the 3rd field with the comma as separator. Then you can print ...


3

NAME chvt - change foreground virtual terminal SYNOPSIS chvt N DESCRIPTION The command chvt N makes /dev/ttyN the foreground terminal. (The corresponding screen is created if it did not exist yet. To get rid of unused VTs, use deallocvt(1).) The key combination (Ctrl-)LeftAlt-FN (with N in the range 1-12) usually has a similar effect.


3

You can use find: find /usr -name '0914_Jul-2014.gz' -exec mv {} /var/tmp \; Or for extremely nested directory hierarchies find /usr -name '0914_Jul-2014.gz' -execdir mv {} /var/tmp \; Although as the documentation states you must ensure that your $PATH environment variable does not reference the current directory (namely .) if you use -execdir


3

Unix has a plethora of locking systems. The one you found is called BSD file locking, but there are other file locking methods. On top of that, you also have semaphores, mutexes and more. As to your direct question, yes, it is a perfectly fine way to go. Don't worry about the time it takes. Locking is a high-overhead activity, by its very nature. This is ...


3

Cron logs on CentOS 6 are located in /var/log/cron by default. This only logs the execution of commands, not the results or exit statuses. The output of the executed command goes to the user's mail by default (root's mail in this case). An alternate email can be specified by the MAILTO variable inside of the crontab. You should look at adjusting logrotate ...


2

The section you should ignore is the Configure Network Address Translation section. In fact if you want to guarantee that wireless clients can't go onto the Ethernet connection do the following: Run sudo nano /etc/sysctl.conf. Scroll to the bottom and add net.ipv4.ip_forward=0 on a new line. Save the file. This will disable ip forwarding on boot up. Run: ...


2

Regarding Village's Bounty, all I can find is an archived mailing list post from August, 2011 stating that the preferred default before kernel commit r225076 was 32 GB, and up to 32 Slices for a Total of 1 TB of Ram (32^2 = 1024) After r225076 the limit per slice was removed, but the thread goes on to say that the practical limit should still be considered ...


2

Following should work for postfix equal or higher than 2.7. You need to modify /etc/postfix/master.cf, change the line smtp inet n - n - - smtpd to something like this: domain1 unix - - n - - smtp -o syslog_name=postfix-mail.example.com -o smtp_helo_name=mail.example.com -o smtp_bind_address=1.1.1.1 ...


2

LiveCDs usually have something like a "Root terminal" you can open to do things as the superuser. From there, you should be able to cd to where the filesystem is mounted and simply mv the relevant directories. For example, if the mount point is /mnt/fs, and you want to move the /mnt/fs/home/me/whatever/etc directory back: > cd /mnt/fs > mv ...


2

When gvim starts, it sources a file called mswin.vim via the _vimrc file. In the mswin.vim file the keys are remapped. You can undo this two ways. One is edit the mswin.vim file and remove the mapping (not recommended). A second easier potentially less invasive way is to edit the _vimrc file. 1. Start gvim as Administrator. 2. Click ...


2

If you've got a list of decimal integer numbers as sequences of 1 or more decimal digits, the first one not being 0 except for the number 0 itself, with no +/- sign, one per line, then you could use: grep -xE '3[7-9]|[4-9][0-9]|1[0-9]{2}|200'


2

You can use :: only once. To cite the standard: "The longest sequence of consecutive all-zero fields is replaced by double-colon. If there are multiple longest runs of all-zero fields, then it is the leftmost that is compressed. E.g., 2001:db8:0:0:1:0:0:1 is rendered as 2001:db8::1:0:0:1 rather than as 2001:db8:0:0:1::1." Try instead: sudo ifconfig wlan0 ...


2

Use -type f if you only want regular files. If on a GNU system, the -printf predicate can show you the date. find -maxdepth 1 -type f -mtime -50 -printf "%T+ %p\n"


2

Both redirect stdout to file. ls > list If file exists it'll be replaced. ls >> list If file not exists it'll be created. If it exists, it'll be appended to the end of file. Find out more: IO Redirection



Only top voted, non community-wiki answers of a minimum length are eligible