Been keeping a text diary for the last 7 months

>been keeping a text diary for the last 7 months
>today
>cat > diary.txt instead of cat >> diary.txt

Attached: 1fb.png (600x583, 340K)

Other urls found in this thread:

jrnl.sh/
twitter.com/NSFWRedditVideo

Journaling is about the catharsis of the act, not the conservation of the content within. Don't sweat it and keep journaling.

Clearly you were were just a hacker wannabe or else you'd have a script to ensure this didn't happen.

Attached: 1519090953176.jpg (400x368, 44K)

>not checking your diary into your github.com repo

You didn't back it up to a private git repo or something?

>being retarded
>blaming the computer
stupid FUCKING frog, please kill yourself and do everyone a favor

why you want yourself die?

i'm not a frogposting fucking moron who can't check my terminal commands before hitting enter, don't try to turn this around on me.

>not using got for versioning
You have nobody but yourself to blame

Where did he blame the computer?

this is why linux users are fucking autistic

one user making a mistake has nothing to do with 'all linux users', Rajeesh

Here's a function for you OP so that doesn't happen again :%)
function diaryentry {
diaryfile="$HOME/Documents/diary/diary"
if [ -f $diaryfile ]; then
tmpfile=$(mktemp)
printf '%s\n%s\n' "$(date)" "$*" | cat - "$diaryfile" > "$tmpfile"
mv "$tmpfile" "$diaryfile"
head -n 20 "$diaryfile"
else
echo "File Not Found!"
return 1
fi
}

>not posting your diary in random Jow Forums threads instead

Attached: 1505848452883.png (759x553, 576K)

Windows doesn't have this problem.

>7 months of work
>single point of failure with no backups
you deserve everything and more

I think if you didn't try so hard you could have your diary for now user. Keep trying or walking or typing who knows.

It also doesn't have the ability

>been keeping a text diary

Attached: soyboy1.jpg (600x600, 65K)

>cat
Fucking why, user.
Newsflash for you and a great number of Jow Forumsentlemen: There's absolutely nothing wrong with using a tool that makes your task easier. It's not the 60s anymore, text editors are now a thing.

I do this all the time. I hope the world knows my sexual legacy now

Redpill me on keeping a diary, should I keep one and what should or shouldn't I put in it. Sounds cool desu.

>desu
stopped reading right there

You can recover it if the underlying data hasn't been overwritten, and if you haven't restarted your machine it may be cached somewhere as well (for instance, I've recovered a file from sshfs cache before).

Should have scripted it you moron

Why not a least have a new txt for each day?

Excellent that's what you get for being a tryhard retard.

Overcomplicating things doesn't mean you are smarter it means you are autistic.

THIS

wrong thread you IDE using faggot

suit yourself, frogposter

Attached: cat-apu.jpg (604x516, 59K)

his name is Jamal, Tyrone

Take this (You), you.

This holy shit.
I love the terminal and use it every single day, but I don't overlook other tools. It's fine having a GUI at times, it can make things extremely convenient.

I started a journal yesterday. Feels pretty good. I'm writing it by hand in a hard cover notebook though. Hopefully one day I can pass a bundle of them onto my offspring after I die.

Doesn't have the ability to what? Keep a text file saved on the computere?

Are lincucks this delusional?

This might seem as a joke but user is right

Linux:
>cat > diary.txt
>rm -rf /usr /lib/nvidia-current/xorg/xorg
>chmod 0644 -R /*

Windows:
One-click to turn on shadow copies for files you are interested in.
Delete file -> Are you sure -> Moves in recycle bin, you can still recover it
Nonretarded permission system that won't lock you out of the fucking permission system itself

Saying that this is not design faults of Linux console and you are retarded if you do those things is not valid if you NEVER made a typo. If you sometimes hit the wrong key, there is always a probability that you are going to fuck something up badly.

You wear a helmet on motorcycle, you use eye protection when using power tools, etc.

Giving the user the '''''power'''' to run a destructive command on every file on the computer instead of a current folder with one keystroke wrong is a bad design.

>Not using version control
>being this retarded

I hope you get mugged by Tyrone

Teddy Roosevelt kept a diary. Are you manlier than Teddy Roosevelt?

>As president, he repeatedly warned men that they were becoming too office-bound, too complacent, too comfortable with physical ease and moral laxity, and were failing in their duties to propagate the race and exhibit masculine vigor.

Attached: TR_Buckskin_Tiffany_Knife.jpg (476x596, 76K)

>linux so shit you gotta use version numbers on your library

> Windows doesn't have this problem.
Neither do the rocks lining my driveway.

You keep a diary using rocks? Way cool.

My first bash script made a folder for the year, month, and then piped text from the terminal to a text file with a precise time stamp. It created a title and description at the start of the Day text file as well. All I had to do was type "Journal" (or an alias), and it gave me a prompt to type my thoughts.
I recently rediscovered ORG-mode so I'll just remake the script to suite that. I'm retarded so I find Java/C boring but Bash is really fun to me

wincmd also has destructive commands
also DE exists

>not having a paper diary to keep secrets from her computer

Attached: 1469813789616.jpg (1296x968, 369K)

Dumb. Don't use cat to input text. Use vim or something with protected read and insert modes. Only use cat to display the list.

>keeping diary
>on a pc
>through console
>in singular file
Retarded autistic frogposter. Have a pity (You)

>using linux
NOT EVEN ONCE

Should have just used Vim.

>journal in a single file instead of daily files in an organized directory
y tho

It's where the post stops

We all know he was fagging it up on the down low.

>Not using org-mode to create a hierarchical plaintext diary file with foldable levels

Hahaha! This guy gets its.
OP
BTFO
TFO
FO
O
HOW WILL OP EVER RECOVER?
>by learning their lesson and making three backups next time
or so we hope.

>tfw cat programmingAssignment < lp0

You're sort right but sort of have no idea what you're talking about
Windows also has a command line/terminal
Windows will also curb stomp your shit if you use the commands retardedly
A gui will hold your hand, Linux guis ask you if you wanna delete something, Linux guis will do everything else you say too

Repeat after me
>I am a fool who refuses to use vim so I deserve what I get

Or even better
>I am a fool who can't even into nano and I deserve what ever happens

Just restore it?

Naw, that was Lincoln

literally only the first command will work if you're not root

and the first literally works the same way on windows
>type con>diary.txt

this is my version

diary-write.sh

#!/usr/bin/env bash

DIARY_FILE=$HOME/diary
TMP_ENTRY=/tmp/$(date +%s)

$EDITOR $TMP_ENTRY

date >> $DIARY_FILE # bonus points: adding date
cat $TMP_ENTRY >> $DIARY_FILE

rm -f $TMP_ENTRY


add it to your $HOME/bin
and every night run it to add more stuff to it

Attached: maxresdefault.jpg (1280x720, 116K)

>TMP_ENTRY=/tmp/$(date +%s)
>not using tempfile
3/10, see me after class.

>nano is harder than Vim

Attached: 1520472371572.jpg (493x387, 56K)

> using cat instead of butterflies

Attached: real_programmers.png (740x406, 83K)

>who can't *even* into nano
>who can't *EVEN* into nano
Lrn2rd

cat has nothing to do with linux, pleb

Not a problem if you run one of the Plan 9 fs's. You can just restore files from dump, ezpz.

Attached: 9ballcirno.jpg (600x600, 40K)

i don't udderstand

>blaming the computer
>except he obviously didn’t
Congratulations, you’re a fucking retard

Attached: 32D26640-FE6C-4F2D-A6B8-1D77E13A2887.jpg (1242x1036, 134K)

He implied nano is easier.

the absolute state of freetards

someone nuke us pls america was a mistake

>not having a physical diary

serves you right

install suicide linux

user dear you should be using org-mode

>Not using Facebook

Attached: pepe.jpg (300x250, 10K)

I have to agree. But Linugs is like riding motorcycle, you have to be careful! Which is why I reserve it to use as a server and not a daily casual use PC like OP has.

Attached: 1515758546759.png (2000x2000, 199K)

>No backup

Attached: 1514236904233.gif (173x267, 1.39M)

Kek. This is why I have automated btrfs snapshots.

r8 my diary script
function diaryentry {
diarybasedir="$HOME/Documents/diary"
year=$(date -u +"%Y")
month=$(date -u +"%m")
day=$(date -u +"%d")
time=$(date -u +"%T")
diarydir="$diarybasedir/$year/$month/$day"
if [ ! -d "$diarydir" ]; then
mkdir -p "$diarydir"
echo "Making directory $diarydir"
fi
entry="$(date)";
local IFS=''
while true; do
read currline;
if [[ -n "$currline" ]]; then
entry="$entry"$'\n'"$currline"
else
break
fi
done
if [[ -z "$entry" ]]; then
echo "No text entered!"
return 1
fi
diaryfile="$diarydir/$time"
printf '%s\n' "$entry" | gpg --output "$diaryfile" --encrypt --recipient njake -
return 0
}

Ever heard about noclobber?

use windows 10 next time

yes, yes it does

echo blah > file.txt writes "blah" to file.txt
echo blah >> file.txt appends "blah" to file.txt
it's basic convention
it's just that windows is less consistent with non alphanumeric strings (eg containing s, requiring ^ for )

tl;dr: it has the ability

type con >> diary.txt
ftfy

on linux just add this line to your .bashrc
diary(){ echo "$(date +%D) $*" >> ~/diary; }

My diary function:
function diary() {
root="~/Documents/journal"
date="$(date -u +"%Y/%m/%d")"
dir="$root/$date"

name="$(date -u +"%T")"
if [ ! -z "$1" ]; then
name+=" '$1'"
fi

path="$dir/$name"

mkdir -p "$dir"
vim "$path"
}

restore from backup, use nano next time
/thread

POSIX compliant:
diary() {
echo "$@" >> ~/Documents/diary-$(date '+%Y%m%d')
}

>journaling in a text file instead of in a physical book.

Restore from backup, duh

If it was fitting in a single disk cluster there's a reasonable chance you can just find it in /dev/sdx by using a known part of the file.

Did that a couple of times to get back stuff I accidentally deleted.

>saw a black man walking my way
>crossed the street to avoid him
>sjws control the world
the noble legacy of a Jow Forums user

cp diary.txt diary.bak
cat >> diary.txt
7 April 2018
Today OP is of having very sad day. Many feels for him.

Attached: c84.jpg (700x575, 78K)

>not writing an elaborate, rube golberg-tier shell script for adding to your diary

Listen to these people, very likely recoverable. Linux makes this kind of recover work easy, you can use /dev/sd*, /dev/mem, /dev/kmem, /proc/[pid]/maps, etc to recover information in all sorts of unlikely circumstances.

>the state of loonix autists

Attached: 1519703419880.gif (1100x450, 326K)

>using cat>> rather than nano to input text

Full pleb

git
noclobber

Also set up a weekly backup for your data or something, eh.

Guys, there's a better way, and it's beautiful. Not only that, it integrates well with any text editor (vim, emacs, nano, etc.) you throw at it.
Check it out: jrnl.sh/

Looks gay as fuck. Why would I want to integrate this into my emacs config when org-mode just works? And go shill your soyware somewhere else, thanks