#[solved] dumb question but could cat dev mem mess up my system

19 messages · Page 1 of 1 (latest)

toxic pine
#

never run random commands because yes, if you don't know what it does. cat just reads and prints data afaik

#

.aw cat

undone nebulaBOT
ashen raptor
#

i know what cat does

#

i know it just reads files

#

but brain goes "loud noise scary" and "computer acting up scary"

#

i should probably take

#

this somewhere else

#

sorry

toxic pine
undone nebulaBOT
#

#11040 📣 ```js
cheat.sheets:cat

POSIX way in which to cat(1); see cat(1posix).

cat -u [FILE_1 [FILE_2] ...]

Output a file, expanding any escape sequences (default). Using this short

one-liner let's you view the boot log how it was show at boot-time.

cat /var/log/boot.log

This is an ever-popular useless use of cat.

cat /etc/passwd | grep '^root'

The sane way:

grep '^root' /etc/passwd

If in bash(1), this is often (but not always) a useless use of cat(1).

Buffer=cat /etc/passwd
# The sane way:
Buffer=< /etc/passwd
cheat:cat

To display the contents of a file:

cat <file>

To display file contents with line numbers

cat -n <file>

To display file contents with line numbers (blank lines excluded)

cat -b <file>
tldr:cat

cat

Print and concatenate files.

More information: https://www.gnu.org/software/coreutils/cat.

Print the contents of a file to the standard output:

cat path/to/file

Concatenate several files into an output file:

cat path/to/file1 path/to/file2 ... > path/to/output_file

Append several files to an output file:

cat path/to/file1 path/to/file2 ... >> path/to/output_file

Copy the contents of a file into an output file without buffering:

cat -u /dev/tty12 > /dev/tty13

Write stdin to a file:

cat - > path/to/file
$```

toxic pine
ashen raptor
#

no like

#

another server

toxic pine
#

idk

#

... solved

undone nebulaBOT
#

#9742 📣 If there is nothing else that we can do for you, please close this thread by adding "[SOLVED]" to the title.

  • You can do this on desktop by clicking the three dots on the top right of the page, and pressing "Edit Post".
  • You can also do this on Android / iOS by long tapping your post in the text channel list, and tapping "Edit Post".

Your title should be like so: https://cdn.discordapp.com/attachments/503224329191030787/1039841700417384498/image.png
Thank you

ashen raptor
#

i don't think anyone here wants to hear about this

toxic pine
#

as I solved this