mahiki / desertislandutils

convenience shell utility scripts written in python
1 stars 0 forks source link

`too move DESTINATION` #2

Open mahiki opened 2 years ago

mahiki commented 2 years ago

Sometimes after the toobig folders have been created I decide to move a parent directory somewhere. The symlinks will continue to point to valid toodoc|toobig|toodata directories, but the parallel file structure will start to drift away from the main directory structure.

Add a feature to the too utility that will move folders, move toobigdata folders, and relabel all the symlinks.

$> tree

~/madrona/career/houseofsteaks/
    |-- textfile.txt
    |-- doc -> ~/toodoc/madrona/career/houseofsteaks/

# now suppose I want to move houseofsteaks/ to ~/madrona/archive/houseofsteaks

$> too move ~/madrona/career/houseofsteaks/ ~/madrona/archive/houseofsteaks
# ~/madrona/career/houseofsteaks/                 ->    ~/madrona/archive/houseofsteaks
# ~/toodoc/madrona/career/houseofsteaks/    ->    ~/toodoc/madrona/archive/houseofsteaks/

$> tree ~/madrona/archive/houseofsteaks
~/madrona/archive/houseofsteaks/
    |-- textfile.txt
    |-- doc -> ~/toodoc/madrona/archive/houseofsteaks/
mahiki commented 1 month ago

Just wanna upvote this here dayng