Commands starting with P
is what you seek.
Usage: P[?.+-*cdilnsS] [file] Project management
| P [file] open project (formerly Po)
| P. show current loaded project (see prj.name)
| P+ [name] save project (same as Ps, but doesnt checks for changes)
| P- [name] delete project
| P* printn project script as r2 commands
| P!([cmd]) open a shell or run command in the project directory
| Pc close current project
| Pd [N] diff Nth commit
| Pi [file] show project information
| Pl list all projects
| Pn - edit current loaded project notes using cfg.editor
| Pn[j] manage notes associated with the project
| Ps [file] save project (see dir.projects)
| PS [file] save script file
| PS* [name] print the project script file (Like P*, but requires a project)
| Pz[ie] [zipfile] import/export r2 project in zip form (.zrp extension)
| NOTE: the 'e prj.name' evar can save/open/rename/list projects.
| NOTE: see the other 'e??prj.' evars for more options.
| NOTE: project are stored in dir.projects
Example of save/restore session:
$ r2 -
[0x00000000]> f myflag = 0xdeadbeef
[0x00000000]> Ps myproject
[master (root-commit) cbcd6c2] default message
Author: dacav <dacav@localhost>
1 file changed, 687 insertions(+)
create mode 100644 rc.r2
[0x00000000]> q
Starting a new session:
$ r2 -
[0x00000000]> Pl
myproject
[0x00000000]> P myproject
[0x00000000]> f | grep myflag
0xdeadbeef 0 myflag
The project saving is done using git
, as suggested by the Ps
output. I think using git
is a great idea, and I like how Pd
can tell what happened in a project over time.
Projects are saved under the directory pointed by the dir.projects
configuration variable.
Also, the original question is quite old, and even trying Po
will result in a deprecation warning these days.