Here’s how to display history without the line numbers.
history -w /dev/stdout |
Result
cd /etc/httpd/conf view httpd.conf vim wiki.conf vim ssl.conf |
cloud engineer
Here’s how to display history without the line numbers.
history -w /dev/stdout |
history -w /dev/stdout
Result
cd /etc/httpd/conf view httpd.conf vim wiki.conf vim ssl.conf |
cd /etc/httpd/conf view httpd.conf vim wiki.conf vim ssl.conf
Here’s how to copy a directory structure from one directory to another without the files.
Copy directory structure of DIR1 to DIR2.
find /DIR1 -type d > /tmp/dirs.txt sed -i 's/DIR1/DIR2/' /tmp/dirs.txt xargs mkdir -p < /tmp/dirs.txt chown -R USER:GROUP /DIR2 |
find /DIR1 -type d > /tmp/dirs.txt sed -i 's/DIR1/DIR2/' /tmp/dirs.txt xargs mkdir -p < /tmp/dirs.txt chown -R USER:GROUP /DIR2
Here’s how to view the contents of a tar file without extracting the files.
tar -tvf file.tar |
tar -tvf file.tar