Reverse characters on each line
Answer:
To reverse characters on each line, e.g.
abc
def
Become...
cba
fed
You can use the rev command:
# rev input.txt
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Reverse characters on each line
Answer:
To reverse characters on each line, e.g.
abc
def
Become...
cba
fed
You can use the rev command:
# rev input.txt
Mount a filesystem by UUID in Linux
Anwser:
Assumed you know the UUID of your harddisks, you want to mount it for use, try the following method:
# mount -U 9f95f559-9986-4dfc-8661-849bb54ed5a5 /mnt/data1
How to list all the UUID of my hard disks
Answer:
To list all the UUID of my hard disks, you can use the blkid command.
# sudo blkid
/dev/sda1: UUID="9f95f559-9986-4dfc-8661-849bb54ed5a5" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="0fe4eedc-65dd-4b46-85c9-11795f2cdc57"
How to shutdown a frozen Linux System?
Answer:
Similar to this post, but this time you are going to shutdown a frozen Linux system.
The last letter O tell the system to shutdown. Replace by the letter R if you want reboot instead.
Immediate time synchronization in RHEL/CentOS/Fedora
Answer:
If you want to sync the system time without installing ntpd package, rdate is an older way but it will do what you need.
# rdate -s ntp0.cornell.edu
You can find a list of time servers at: http://pank.org/blog/2004/08/time-server-list.html